示例#1
0
 @Override
 public void onExit() {
   // save all painters
   for (EntryListPanel panel : listPanelSet) {
     myjava.gui.syntax.Painter painter = panel.getPainter();
     if (!painter.equals(myjava.gui.syntax.Painter.getDefaultInstance())) {
       myjava.gui.syntax.Painter.add(painter);
       setConfig("painter.userDefined." + painter.getName(), painter.toWritableString());
     }
     if (painter.equals(painterComboBox.getSelectedItem())) {
       // selected painter
       setConfig("syntax.selectedPainter", painter.getName());
       myjava.gui.syntax.Painter.setCurrentInstance(painter);
     }
   }
   // remove "removed painters"
   for (myjava.gui.syntax.Painter removed : removedPainters) {
     removeConfig0("painter.userDefined." + removed.getName());
     myjava.gui.syntax.Painter.remove(removed);
   }
   // highlight?
   boolean _highlightSyntax = highlightSyntax.isSelected();
   boolean _matchBracket = matchBracket.isSelected();
   MyUmbrellaLayerUI.setHighlightingStatus(_highlightSyntax, _matchBracket);
   setConfig("syntax.highlight", _highlightSyntax + "");
   setConfig("syntax.matchBrackets", _matchBracket + "");
 }
示例#2
0
 private void addPainter(myjava.gui.syntax.Painter painter) {
   EntryListPanel newPanel = new EntryListPanel(painter);
   listPanelSet.add(newPanel);
   centerPanel.add(newPanel, painter.getName());
   painterComboBox.removeItemListener(painterChangeListener);
   painterComboBox.removeAllItems();
   for (EntryListPanel p : listPanelSet) {
     painterComboBox.addItem(p.getPainter());
   }
   removedPainters.remove(painter);
   painterComboBox.addItemListener(painterChangeListener);
 }
示例#3
0
 @Override
 public int compareTo(EntryListPanel panel) {
   return this.getPainter().compareTo(panel.getPainter());
 }