Package javax.swing

Examples of javax.swing.AbstractButton$AccessibleAbstractButton


        return new Dimension(width, height);
    }

    @Override
    protected Dimension getDefaultSize() {
        AbstractButton button = HudWidgetFactory.createHudButton("Button");
        return new Dimension(DEFAULT_WIDTH, button.getPreferredSize().height);
    }
View Full Code Here


        Icon preferences = new ImageIcon(DEverything.class.getResource(
                "/com/explodingpixels/macwidgets/icons/PreferencesGeneral.png"));
        Icon gear = new ImageIcon(DEverything.class.getResource(
                "/com/explodingpixels/macwidgets/icons/Advanced.png"));

        AbstractButton greyGlobeButton =
                MacButtonFactory.makeUnifiedToolBarButton(
                        new JButton("Network", greyGlobeIcon));
        greyGlobeButton.setEnabled(false);

        AbstractButton blueButton = new JButton("MobileMe", blueGlobeIcon);
        blueButton.setEnabled(true);

        UnifiedToolBar toolBar = new UnifiedToolBar();
        toolBar.addComponentToLeft(MacButtonFactory.makeUnifiedToolBarButton(
                blueButton));
        toolBar.addComponentToLeft(greyGlobeButton);
View Full Code Here

        private final int CHECK_BOX_SIZE = 12;

        public void paintIcon(Component c, Graphics g, int x, int y) {

            AbstractButton button = (AbstractButton) c;

            Graphics2D graphics = (Graphics2D) g.create();
            // translate the graphics context so that 0,0 is the top/left of the check box. this
            // allows us to then delegate the painting to the HudPaintingUtils method, which assumes
            // 0,0.
            graphics.translate(x, y);
            HudPaintingUtils.paintHudControlBackground(graphics, button, CHECK_BOX_SIZE,
                    CHECK_BOX_SIZE, HudPaintingUtils.Roundedness.CHECK_BOX);
            drawCheckMarkIfNecessary(graphics, button.getModel());
            graphics.dispose();
        }
View Full Code Here

        Icon greyGlobeIcon = new ImageIcon(DUnifiedToolbar.class.getResource(
                "/com/explodingpixels/macwidgets/icons/Network.png"));
        Icon gear = new ImageIcon(DUnifiedToolbar.class.getResource(
                "/com/explodingpixels/macwidgets/icons/Advanced.png"));

        AbstractButton greyGlobeButton =
                MacButtonFactory.makeUnifiedToolBarButton(
                        new JButton("Network", greyGlobeIcon));
        greyGlobeButton.setEnabled(false);

        UnifiedToolBar toolBar = new UnifiedToolBar();

        toolBar.addComponentToLeft(viewButtons.getComponent());
        toolBar.addComponentToCenter(MacButtonFactory.makeUnifiedToolBarButton(
View Full Code Here

    }

    @Override
    public void paint(Graphics g, JComponent c) {

        AbstractButton button = (AbstractButton) c;
        Graphics2D graphics = (Graphics2D) g.create();

        int buttonHeight = button.getHeight() - HudPaintingUtils.getHudControlShadowSize(button);
        HudPaintingUtils.paintHudControlBackground(graphics, button, button.getWidth(),
                buttonHeight, fRoundedness);

        graphics.dispose();

        super.paint(g, c);
View Full Code Here

  public void setActionEnabled(String id, boolean enable) {
    Collection buttons = toolBarFactory.getButtonsFromId(id);
    if (buttons != null) {
      Iterator i = buttons.iterator();
      while (i.hasNext()) {
        AbstractButton button = (AbstractButton)i.next();
        if (button != null)
          button.setEnabled(enable);
      }
    }
    JMenuItem menuItem = menuFactory.getMenuItemFromId(id);
    if (menuItem != null)
      menuItem.setEnabled(enable);
View Full Code Here

  public void setActionVisible(String id, boolean enable) {
    Collection buttons = toolBarFactory.getButtonsFromId(id);
    if (buttons != null) {
      Iterator i = buttons.iterator();
      while (i.hasNext()) {
        AbstractButton button = (AbstractButton)i.next();
        if (button != null)
          button.setVisible(enable);
      }
    }
    JMenuItem menuItem = menuFactory.getMenuItemFromId(id);
    if (menuItem != null)
      menuItem.setVisible(enable);
View Full Code Here

  public void setActionSelected(String id, boolean enable) {
    Collection buttons = toolBarFactory.getButtonsFromId(id);
    if (buttons != null) {
      Iterator i = buttons.iterator();
      while (i.hasNext()) {
        AbstractButton button = (AbstractButton)i.next();
        if (button != null) {
          button.setSelected(enable);
          if (button instanceof JToggleButton) {
          //  button.setBackground(enable ? Color.GRAY : ExtButtonFactory.BACKGROUND_COLOR);
          }
        }
      }
View Full Code Here

  public void setText(String id, String text) {
    Collection buttons = toolBarFactory.getButtonsFromId(id);
    if (buttons != null) {
      Iterator i = buttons.iterator();
      while (i.hasNext()) {
        AbstractButton button = (AbstractButton)i.next();
        if (button != null)
          button.setToolTipText(text);
      }
    }
    JMenuItem menuItem = menuFactory.getMenuItemFromId(id);
    if (menuItem != null)
      menuItem.setText(text);
View Full Code Here

      String s = (String) it.next();
      if (s.equals(SEPARATOR)) {
          buttonGroup = null;
        result.add(new JToolbarSeparator());
      } else {
        AbstractButton button =  createJButton(s);
        boolean visible = true;
        try {
          visible = getBoolean(s + ExtButtonFactory.VISIBLE_SUFFIX);
        } catch (MissingResourceException e) {
        }
View Full Code Here

TOP

Related Classes of javax.swing.AbstractButton$AccessibleAbstractButton

Copyright © 2018 www.massapicom. 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.