Examples of ArrowButton


Examples of com.mucommander.ui.button.ArrowButton

        add(new JScrollPane(dynamicList), BorderLayout.CENTER);

        JPanel buttonPanel = new JPanel(new GridLayout(2, 1));

        // Create 'Move item up' button
        JButton moveButton = new ArrowButton(dynamicList.getMoveUpAction(), ArrowButton.UP_DIRECTION);
        // Constrain the button's size which by default is huge under Windows/Java 1.5
        moveButton.setPreferredSize(new Dimension(19, 0));

        // Make the button non focusable so that it doesn't steal focus from the list
        moveButton.setFocusable(false);

        moveButton.setToolTipText(Translator.get("sortable_list.move_up"));
        buttonPanel.add(moveButton);

        // Create 'Move item down' button
        moveButton = new ArrowButton(dynamicList.getMoveDownAction(), ArrowButton.DOWN_DIRECTION);
        // Constrain the button's size which by default is huge under Windows/Java 1.5
        moveButton.setPreferredSize(new Dimension(19, 0));

        // Make the button non focusable so that it doesn't steal focus from the list
        moveButton.setFocusable(false);

        moveButton.setToolTipText(Translator.get("sortable_list.move_down"));
        buttonPanel.add(moveButton);

        add(buttonPanel, BorderLayout.EAST);
    }
View Full Code Here

Examples of org.eclipse.draw2d.ArrowButton

  }
 
  protected Clickable createButton() {
    final Color foreground = CommonUIPlugin.getDefault().getColorRegistry().get(IDetailsColors.COLOR_DARK_SHADOW);
    final Color background = CommonUIPlugin.getDefault().getColorRegistry().get(IDetailsColors.COLOR_TRAY_BACKGROUND);
    Button result = new ArrowButton() {
      protected void paintBorder(Graphics graphics) {
        graphics.setForegroundColor(foreground);
        Rectangle r = getBounds().getCopy();
        r.shrink(0, 2);
        r.width -= 1;
        graphics.drawRectangle(r);
      }
    };
    result.setBackgroundColor(background);
    // sets the triangle color
    ((Triangle)result.getChildren().get(0)).setBackgroundColor(foreground);
    return result;
  }
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.