Examples of addActionListener()


Examples of DisplayProject.controls.MenuList.addActionListener()

//                for (ActionListener listener : item.getActionListeners()){
//                    item.removeActionListener(listener);
//                }
//            }
            item.removeActionListener(this);
            item.addActionListener(this);
        }
    }

    public void actionPerformed(ActionEvent e) {
        List<EventHandle> eventsToPost = new ArrayList<EventHandle>();
View Full Code Here

Examples of ModalGUI.GUIButton.addActionListener()

    window.add(guiImg);

    GUIButton button;
    button = new GUIToggle(400, 50, "gui/WINDOW_MAKE_PREVIEW_PATTERN.png",
        GLOBAL.gui);
    button.addActionListener(GLOBAL.uiTools, "toggleView", UITools.LEG_TOOL);
    button.addActionListener(window, "close", UITools.LEG_TOOL);
    window.add(button);
    posY += spacingY;

    button = new GUIToggle(400, 200, "gui/WINDOW_MAKE_CUT_PATTERN.png",
View Full Code Here

Examples of ModalGUI.GUINumberfield.addActionListener()

    if (sliceSelection.type == CrossSliceSelection.SLICES
        || sliceSelection.type == CrossSliceSelection.SINGLE_SLICE
        || sliceSelection.type == CrossSliceSelection.SLATSLICES) {
      GUINumberfield slatHeight = new GUINumberfield(xPos, yPos, 30, 15,
          this.controller);
      slatHeight.addActionListener(sliceSelection, "slatHeight");
      String sHeight = Float.toString(sliceSelection.getSlatHeight());
      if (sliceSelection.getSlatHeight() == 0)
        sHeight = "";

      slatHeight.setText(sHeight);
View Full Code Here

Examples of ModalGUI.GUISlider.addActionListener()

    posY += 85;

    GUISlider slider = new GUISlider(GLOBAL.windowWidth - 60, posY, 60, 20,
        50, gui);
    slider.setVal(GLOBAL.uiTools.brush_dia);
    slider.addActionListener(GLOBAL.uiTools, "changeToolWidth",
        UITools.DRAW_TOOL);
    slider.setShowValLabel(true);
    slider.setLabelValMultiplier(2.0f);

    toggle.addToolTip(GLOBAL.applet, "proButtons/GUI_DRAW_TOOLTIP",
View Full Code Here

Examples of ModalGUI.GUIToggle.addActionListener()

    GUIComponentSet toggleSet = new GUIComponentSet();

    GUIToggle toggle = new GUIToggle(posX, posY, button_width,
        button_height, "gui/draw.png", gui);
    toggle.setComponentSet(toggleSet);
    toggle.addActionListener(sketch.getSketchTools(), "selectTool",
        SketchTools.DRAW_TOOL);
    toggle.setLabel("brush");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(toggle);
View Full Code Here

Examples of abbot.editor.widgets.ArrayEditor.addActionListener()

        return field;
    }

    protected ArrayEditor addArrayEditor(String title, Object[] values) {
        ArrayEditor ed = new ArrayEditor(values);
        ed.addActionListener(this);
        // Make sure we resize/repaint when items are added or removed
        ed.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (e.getActionCommand() != ArrayEditor.ACTION_ITEM_CHANGED) {
                    revalidate();
View Full Code Here

Examples of abbot.editor.widgets.TextArea.addActionListener()

    protected JTextArea addTextArea(String title, String value) {
        final TextArea text = new TextArea(value != null ? value : "");
        text.setLineWrap(true);
        text.setWrapStyleWord(true);
        text.setBorder(new JTextField().getBorder());
        text.addActionListener(this);
        add(title, text);
        return text;
    }

    /** Automatically remove the strut spacing and the component. */
 
View Full Code Here

Examples of ae.java.awt.MenuItem.addActionListener()

            menuItem = new CheckboxMenuItem(label, true);
        } else {
            menuItem = new MenuItem(label);
        }
        menuItem.setActionCommand(command);
        menuItem.addActionListener(this);
        menuItem.setEnabled(command != null);
        ((Menu)targetMenu).add(menuItem);
    }
}
View Full Code Here

Examples of at.bestsolution.ext.swing.GradientJRadioButton.addActionListener()

  //  ----------------------------------------------------------------------------
  private JRadioButton createGradientRadioButton(String description, int drawing_mode, int buttonIndex)
  {
    GradientJRadioButton button = new GradientJRadioButton( IconProvider.getInstance(), "fill_gradient" );
    button.setBorder(BorderFactory.createEmptyBorder(8,8,8,8));
    button.addActionListener( new SetDrawing2GradientAction(MainWindow.getDrawingPanel(),drawing_mode,MainWindow.MAIN_WINDOW,buttonIndex,true) );
    button.addChangeListener( MainWindow.getDrawingPanel() );
   
//    SetDrawingModeAction draw_action = new SetDrawingModeAction(description, MainWindow.getDrawingPanel(), drawing_mode, MainWindow.MAIN_WINDOW, buttonIndex);
//    MultipleGradientPaint gradient = new LinearGradientPaint(JGradientChooser.START_,JGradientChooser.CENTER_,JGradientChooser.fractions_,JGradientChooser.colors,MultipleGradientPaint.NO_CYCLE,MultipleGradientPaint.SRGB);
//    button = new JRadioButton( new GradientIcon(gradient) );
View Full Code Here

Examples of at.bestsolution.ext.swing.GradientJRadioButtonMenuItem.addActionListener()

  //  ----------------------------------------------------------------------------
  private JRadioButtonMenuItem createGradientRadioButton(String displayedText, String description, int drawing_mode, int mnemonicKey, KeyStroke accelerator, int buttonIndex)
  {
    GradientJRadioButtonMenuItem button = new GradientJRadioButtonMenuItem( IconProvider.getInstance(), "fill_gradient" );
    button.addActionListener(new SetDrawing2GradientAction(MainWindow.getDrawingPanel(), drawing_mode, MainWindow.MAIN_WINDOW, buttonIndex, true));
    // NOT NEEDED BECAUSE CHANGE LISTENER ALREADY REGISTERED
    // WITHIN TOOLBAR
    // button.addChangeListener(MainWindow.getDrawingPanel());

    return button;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.