|
@@ -22,7 +22,7 @@ public class FlexSubData extends JSplitPane {
|
|
private JPanel currentObj;
|
|
private JPanel currentObj;
|
|
private JButton btnShowObjects;
|
|
private JButton btnShowObjects;
|
|
private FlexiblePane listener;
|
|
private FlexiblePane listener;
|
|
- private boolean shown;
|
|
|
|
|
|
+ private boolean shown; // 0 = Hide, 1= Show
|
|
public FlexSubData(FlexibleData fD) {
|
|
public FlexSubData(FlexibleData fD) {
|
|
setDividerSize(0);
|
|
setDividerSize(0);
|
|
setAlignmentY(Component.CENTER_ALIGNMENT);
|
|
setAlignmentY(Component.CENTER_ALIGNMENT);
|
|
@@ -34,26 +34,26 @@ public class FlexSubData extends JSplitPane {
|
|
subnetInfo.setMinimumSize(new Dimension(600, 100));
|
|
subnetInfo.setMinimumSize(new Dimension(600, 100));
|
|
setLeftComponent(subnetInfo);
|
|
setLeftComponent(subnetInfo);
|
|
subnetInfo.setLayout(null);
|
|
subnetInfo.setLayout(null);
|
|
-
|
|
|
|
|
|
+ shown = true;
|
|
btnShowObjects = new JButton(SHOW);
|
|
btnShowObjects = new JButton(SHOW);
|
|
btnShowObjects.setBounds(135, 13, 99, 23);
|
|
btnShowObjects.setBounds(135, 13, 99, 23);
|
|
btnShowObjects.addActionListener(new ActionListener(){
|
|
btnShowObjects.addActionListener(new ActionListener(){
|
|
public void actionPerformed(ActionEvent e){
|
|
public void actionPerformed(ActionEvent e){
|
|
- if(btnShowObjects.getText() == SHOW){
|
|
|
|
|
|
+ if(shown){
|
|
objectInfo.removeAll();
|
|
objectInfo.removeAll();
|
|
objectInfo.add(currentObj);
|
|
objectInfo.add(currentObj);
|
|
objectInfo.revalidate();
|
|
objectInfo.revalidate();
|
|
objectInfo.updateUI();
|
|
objectInfo.updateUI();
|
|
listener.revalidate();
|
|
listener.revalidate();
|
|
btnShowObjects.setText(HIDE);
|
|
btnShowObjects.setText(HIDE);
|
|
- shown = true;
|
|
|
|
- }else if(btnShowObjects.getText() == HIDE){
|
|
|
|
|
|
+ shown = false;
|
|
|
|
+ }else{
|
|
objectInfo.removeAll();
|
|
objectInfo.removeAll();
|
|
objectInfo.revalidate();
|
|
objectInfo.revalidate();
|
|
objectInfo.updateUI();
|
|
objectInfo.updateUI();
|
|
listener.revalidate();
|
|
listener.revalidate();
|
|
btnShowObjects.setText(SHOW);
|
|
btnShowObjects.setText(SHOW);
|
|
- shown = false;
|
|
|
|
|
|
+ shown = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -62,7 +62,6 @@ public class FlexSubData extends JSplitPane {
|
|
objectInfo = new JPanel();
|
|
objectInfo = new JPanel();
|
|
setRightComponent(objectInfo);
|
|
setRightComponent(objectInfo);
|
|
objectInfo.setLayout(new BoxLayout(objectInfo, BoxLayout.X_AXIS));
|
|
objectInfo.setLayout(new BoxLayout(objectInfo, BoxLayout.X_AXIS));
|
|
- shown = false;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public void setObjects(JPanel obj){
|
|
public void setObjects(JPanel obj){
|
|
@@ -79,16 +78,6 @@ public class FlexSubData extends JSplitPane {
|
|
}
|
|
}
|
|
|
|
|
|
public void repaint(){
|
|
public void repaint(){
|
|
- /*
|
|
|
|
- if(btnShowObjects != null && listener != null && currentObj != null){
|
|
|
|
- if(shown){
|
|
|
|
- btnShowObjects.setText(SHOW);
|
|
|
|
- }else{
|
|
|
|
- btnShowObjects.setText(HIDE);
|
|
|
|
- }
|
|
|
|
- btnShowObjects.doClick();
|
|
|
|
- }
|
|
|
|
- */
|
|
|
|
super.repaint();
|
|
super.repaint();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -98,6 +87,7 @@ public class FlexSubData extends JSplitPane {
|
|
objectInfo.revalidate();
|
|
objectInfo.revalidate();
|
|
objectInfo.updateUI();
|
|
objectInfo.updateUI();
|
|
listener.revalidate();
|
|
listener.revalidate();
|
|
|
|
+ shown = false;
|
|
btnShowObjects.setText(HIDE);
|
|
btnShowObjects.setText(HIDE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -106,6 +96,7 @@ public class FlexSubData extends JSplitPane {
|
|
objectInfo.revalidate();
|
|
objectInfo.revalidate();
|
|
objectInfo.updateUI();
|
|
objectInfo.updateUI();
|
|
listener.revalidate();
|
|
listener.revalidate();
|
|
|
|
+ shown = true;
|
|
btnShowObjects.setText(SHOW);
|
|
btnShowObjects.setText(SHOW);
|
|
}
|
|
}
|
|
}
|
|
}
|