|
@@ -40,9 +40,20 @@ public class FlexSubData extends JSplitPane {
|
|
|
btnShowObjects.addActionListener(new ActionListener(){
|
|
|
public void actionPerformed(ActionEvent e){
|
|
|
if(btnShowObjects.getText() == SHOW){
|
|
|
- showAction();
|
|
|
+ objectInfo.removeAll();
|
|
|
+ objectInfo.add(currentObj);
|
|
|
+ objectInfo.revalidate();
|
|
|
+ objectInfo.updateUI();
|
|
|
+ listener.revalidate();
|
|
|
+ btnShowObjects.setText(HIDE);
|
|
|
+ shown = true;
|
|
|
}else if(btnShowObjects.getText() == HIDE){
|
|
|
- hideAction();
|
|
|
+ objectInfo.removeAll();
|
|
|
+ objectInfo.revalidate();
|
|
|
+ objectInfo.updateUI();
|
|
|
+ listener.revalidate();
|
|
|
+ btnShowObjects.setText(SHOW);
|
|
|
+ shown = false;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -68,37 +79,31 @@ public class FlexSubData extends JSplitPane {
|
|
|
}
|
|
|
|
|
|
public void repaint(){
|
|
|
- if(btnShowObjects != null){
|
|
|
+ if(btnShowObjects != null && listener != null && currentObj != null){
|
|
|
if(shown = true){
|
|
|
showAction();
|
|
|
- System.out.println("show");
|
|
|
- }else if(shown = false){
|
|
|
+ }
|
|
|
+ if(shown = false){
|
|
|
hideAction();
|
|
|
- System.out.println("hide");
|
|
|
}
|
|
|
}
|
|
|
super.repaint();
|
|
|
}
|
|
|
|
|
|
public void showAction(){
|
|
|
- if(currentObj != null && listener != null){
|
|
|
- objectInfo.removeAll();
|
|
|
- objectInfo.add(currentObj);
|
|
|
- objectInfo.revalidate();
|
|
|
- objectInfo.updateUI();
|
|
|
- listener.revalidate();
|
|
|
- btnShowObjects.setText(HIDE);
|
|
|
- }
|
|
|
- super.repaint();
|
|
|
+ objectInfo.removeAll();
|
|
|
+ objectInfo.add(currentObj);
|
|
|
+ objectInfo.revalidate();
|
|
|
+ objectInfo.updateUI();
|
|
|
+ listener.revalidate();
|
|
|
+ btnShowObjects.setText(HIDE);
|
|
|
}
|
|
|
|
|
|
public void hideAction(){
|
|
|
- if(listener != null){
|
|
|
- objectInfo.removeAll();
|
|
|
- objectInfo.revalidate();
|
|
|
- objectInfo.updateUI();
|
|
|
- listener.revalidate();
|
|
|
- btnShowObjects.setText(SHOW);
|
|
|
- }
|
|
|
+ objectInfo.removeAll();
|
|
|
+ objectInfo.revalidate();
|
|
|
+ objectInfo.updateUI();
|
|
|
+ listener.revalidate();
|
|
|
+ btnShowObjects.setText(SHOW);
|
|
|
}
|
|
|
}
|