예제 #1
0
  protected void edit() {
    makeIconEditorFrame(this, "Icon", false, null);
    NamedIcon icon = new NamedIcon(_namedIcon);
    _iconEditor.setIcon(0, "plainIcon", icon);
    _iconEditor.makeIconPanel(false);

    ActionListener addIconAction =
        new ActionListener() {
          public void actionPerformed(ActionEvent a) {
            editIcon();
          }
        };
    _iconEditor.complete(addIconAction, true, false, true);
  }
예제 #2
0
 protected void editIcon() {
   String url = _iconEditor.getIcon("plainIcon").getURL();
   _namedIcon = NamedIcon.getIconByName(url);
   super.setIcon(_namedIcon);
   updateSize();
   _iconEditorFrame.dispose();
   _iconEditorFrame = null;
   _iconEditor = null;
   invalidate();
 }