Esempio n. 1
0
  OpFooter(OpControl control, List<LayerMode> layerModes) {
    super(BoxLayout.X_AXIS);

    layerControls = new LayerControls(control, layerModes, pcs);
    invertRegionSwitch = new InvertRegionCheckBox(control, pcs);
    colorControls = new ColorSelectionControls(control, pcs);

    Box blendBox = Box.createVerticalBox();
    blendBox.add(Box.createVerticalStrut(5));
    blendBox.add(layerControls);
    blendBox.add(invertRegionSwitch);
    blendBox.setBackground(LightZoneSkin.Colors.ToolPanesBackground);
    layerControls.setAlignmentX(Component.LEFT_ALIGNMENT);
    invertRegionSwitch.setAlignmentX(Component.LEFT_ALIGNMENT);

    tabPane = new JTabbedPane();
    tabPane.setFont(LightZoneSkin.fontSet.getSmallFont());
    tabPane.add(LOCALE.get("ToolSettingsTabName"), blendBox);
    tabPane.add(LOCALE.get("ColorSelectionTabName"), colorControls);

    tabPane.setIconAt(0, getThemeIcon(orangeScheme, true));
    tabPane.setIconAt(1, getThemeIcon(orangeScheme, false));

    add(tabPane, BorderLayout.NORTH);

    setBackground(LightZoneSkin.Colors.ToolPanesBackground);

    pcs.addPropertyChangeListener(this);
  }
Esempio n. 2
0
 void restore(XmlNode node) throws XMLException {
   layerControls.restore(node);
   invertRegionSwitch.restore(node);
   colorControls.restore(node);
   if (node.hasAttribute(TabIndexTag)) {
     tabPane.setSelectedIndex(Integer.parseInt(node.getAttribute(TabIndexTag)));
   }
 }
Esempio n. 3
0
 void save(XmlNode node) {
   layerControls.save(node);
   invertRegionSwitch.save(node);
   colorControls.save(node);
   node.setAttribute(TabIndexTag, Integer.toString(tabPane.getSelectedIndex()));
 }
Esempio n. 4
0
 void operationChanged(Operation op) {
   layerControls.operationChanged(op);
   colorControls.operationChanged(op);
 }