MoMeak 7 years ago
parent
commit
6b2fced807
  1. 18
      designer_base/src/com/fr/design/gui/style/BorderPane.java

18
designer_base/src/com/fr/design/gui/style/BorderPane.java

@ -27,6 +27,7 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.*;
import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
/** /**
@ -35,18 +36,7 @@ import java.util.HashSet;
*/ */
public class BorderPane extends AbstractBasicStylePane implements GlobalNameObserver { public class BorderPane extends AbstractBasicStylePane implements GlobalNameObserver {
private static final HashSet<String> BORDERSET = new HashSet<String>() {{ private static String[] BORDERARRAY = {"currentLineCombo", "currentLineColorPane", "outerToggleButton", "topToggleButton", "leftToggleButton", "bottomToggleButton", "rightToggleButton", "innerToggleButton", "horizontalToggleButton", "verticalToggleButton"};
add("currentLineCombo");
add("currentLineColorPane");
add("outerToggleButton");
add("topToggleButton");
add("leftToggleButton");
add("bottomToggleButton");
add("rightToggleButton");
add("innerToggleButton");
add("horizontalToggleButton");
add("verticalToggleButton");
}};
private boolean insideMode = false; private boolean insideMode = false;
private UIToggleButton topToggleButton; private UIToggleButton topToggleButton;
@ -210,8 +200,8 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
} }
CellBorderStyle cellBorderStyle = this.update(); CellBorderStyle cellBorderStyle = this.update();
HashSet<String> borderSet = new HashSet<String>(Arrays.asList(BORDERARRAY));
if (BORDERSET.contains(globalNameListener.getGlobalName())) { if (borderSet.contains(globalNameListener.getGlobalName())) {
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
} else { } else {

Loading…
Cancel
Save