|
@@ -212,6 +212,8 @@ public class GUI implements CategoryListener {
|
|
|
private final UnitGraph unitGraph;
|
|
|
/** Textfield to show the period of an element */
|
|
|
private final JTextField unitGraphLocalPeriod = new JTextField();
|
|
|
+ private final JCheckBox unitGraphStretchMode=new JCheckBox();
|
|
|
+ private final JLabel unitGraphStretchModeLbl=new JLabel(" Use global");//Some padding
|
|
|
private final JSplitPane splitPane3 = new JSplitPane();
|
|
|
private final JSlider sizeSlider = new JSlider();
|
|
|
private final JLabel lblImageSize = new JLabel(Languages.getLanguage()[94]);
|
|
@@ -1103,22 +1105,28 @@ public class GUI implements CategoryListener {
|
|
|
-unitGraphLocalPeriodLbl.getWidth());
|
|
|
|
|
|
*/
|
|
|
- toolBarGraph.add(horizontalStrut);
|
|
|
+ toolBarGraph.add(horizontalStrut);//What is this for?
|
|
|
|
|
|
/** Add local Graph length Textfield an Label */
|
|
|
- unitGraphLocalPeriod.setPreferredSize(new Dimension(30, 12));
|
|
|
+ unitGraphLocalPeriod.setPreferredSize(new Dimension(30, 20));//TODO
|
|
|
unitGraphLocalPeriod.setText(""+unitGraph.getLocalPeriod());
|
|
|
resetGraphBtn.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
|
|
|
toolBarGraph.add(unitGraphLocalPeriodLbl);
|
|
|
-
|
|
|
unitGraphLocalPeriodLbl.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
toolBarGraph.add(unitGraphLocalPeriod);
|
|
|
|
|
|
-
|
|
|
resetGraphBtn.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
-
|
|
|
toolBarGraph.add(resetGraphBtn);
|
|
|
+
|
|
|
+ toolBarGraph.add(unitGraphStretchModeLbl);
|
|
|
+ unitGraphStretchModeLbl.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+
|
|
|
+ toolBarGraph.add(unitGraphStretchMode);
|
|
|
+ unitGraphStretchMode.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ unitGraphStretchMode.addActionListener(e ->
|
|
|
+ {unitGraph.setStretching(unitGraphStretchMode.isSelected());}
|
|
|
+ );
|
|
|
toolBarGraph.setFloatable(false);
|
|
|
|
|
|
|
|
@@ -2953,11 +2961,13 @@ public class GUI implements CategoryListener {
|
|
|
private void repaintGraphAux(ArrayList<HolonElement> o){//TODO:
|
|
|
unitGraph.repaintWithNewElement((ArrayList<HolonElement>)o);
|
|
|
unitGraphLocalPeriod.setText(""+unitGraph.getLocalPeriod());
|
|
|
+ unitGraphStretchMode.setSelected(unitGraph.isStretching());
|
|
|
}
|
|
|
|
|
|
private void repaintGraphAux(HolonSwitch o){//TODO:
|
|
|
unitGraph.repaintWithNewSwitch(o);
|
|
|
unitGraphLocalPeriod.setText(""+unitGraph.getLocalPeriod());
|
|
|
+ unitGraphStretchMode.setSelected(unitGraph.isStretching());
|
|
|
}
|
|
|
|
|
|
public void updateIterations() {
|