Package javax.swing

Examples of javax.swing.JToggleButton$ToggleButtonModel


    ceCalled = true;
  }

  public void test(TestHarness harness)
  {
    JToggleButton b = createToggleButton(harness);

    testStateChanges(harness, b);
    testListeners(harness, b);
  }
View Full Code Here


  /**
   * Create the test object and also check its basic properties.
   */
  private JToggleButton createToggleButton(TestHarness harness)
  {
    JToggleButton b = new JToggleButton();
    b.setText(LABEL);
    harness.check(b.getText(), LABEL, LABEL);

    b.setToolTipText("tip");
    harness.check(b.getToolTipText(), "tip", "tooltip");

    harness.check(!b.isSelected(), "initial state");
    harness.check(b.isShowing(), false, "surely unvisible");
    harness.check(b.isOpaque(), true, "must be opaque by default");
    harness.check(b.getActionCommand(), LABEL, "getActionCommand");
    return b;
  }
View Full Code Here

*/
public class constructor implements Testlet
{
  public void test(TestHarness h)
  {
    JToggleButton t1 = new JToggleButton();
    h.check(t1.getText(), "", "Button label should default to \"\"");

    t1 = new JToggleButton((String) null);
    h.check(t1.getText(), "", "Button label should default to \"\"");
  }
View Full Code Here

    alNotified = true;
  }

  public void test(TestHarness harness)
  {
    JToggleButton b = new JToggleButton();
    b.addActionListener(this);

    testProgrammaticChanges(harness, b);
    testUserChanges(harness, b);
  }
View Full Code Here

public class getActionCommand extends
    gnu.testlet.javax.swing.AbstractButton.getActionCommand implements
    Testlet {

  public void test(TestHarness harness) {
    check(new JToggleButton("bla"), harness);
  }
View Full Code Here

  {
    final String magicKey = String.valueOf(settingPlugins.size());
    settingPlugins.add(component);
    cardPanel.add(component, magicKey);

    final JToggleButton toggleButton = new JToggleButton(title, icon);
    toggleButton.setHorizontalTextPosition(JToggleButton.CENTER);
    toggleButton.setVerticalTextPosition(JToggleButton.BOTTOM);
    toggleButton.addActionListener(new SelectPanelAction(magicKey));

    panelButtons.add(toggleButton);
    settingsButtons.add(toggleButton);

    final JPanel helperPanel = new JPanel(new BorderLayout());
View Full Code Here

    groupedAction = new ShowGroupedAction();
    ascendingAction = new ShowSortedAscendingAction();
    descendingAction = new ShowSortedDescendingAction();

    final JToggleButton groupButton = new JToggleButton(groupedAction);
    final JToggleButton sortAscendingButton = new JToggleButton(ascendingAction);
    final JToggleButton sortDescendingButton = new JToggleButton(descendingAction);

    final ButtonGroup buttonGroup = new ButtonGroup();
    buttonGroup.add(groupButton);
    buttonGroup.add(sortAscendingButton);
    buttonGroup.add(sortDescendingButton);
View Full Code Here

      tinaAffineTransformationPanel.add(getAffineFlipHorizontalButton(), null);
      tinaAffineTransformationPanel.add(getAffineFlipVerticalButton(), null);
      tinaAffineTransformationPanel.add(getAffineScaleXButton(), null);
      tinaAffineTransformationPanel.add(getAffineScaleYButton(), null);

      affinePreserveZButton = new JToggleButton();
      affinePreserveZButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          tinaController.affinePreserveZButton_clicked();
        }
      });
View Full Code Here

      previewEastDefaultPanel.setPreferredSize(new Dimension(52, 10));
      FlowLayout fl_previewEastDefaultPanel = (FlowLayout) previewEastDefaultPanel.getLayout();
      fl_previewEastDefaultPanel.setVgap(1);
      previewEastMainPanel.add(previewEastDefaultPanel, BorderLayout.WEST);

      mouseTransformEditViewButton = new JToggleButton();
      previewEastDefaultPanel.add(mouseTransformEditViewButton);
      mouseTransformEditViewButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          expandGradientEditorFncPnl(false);
          tinaController.mouseTransformViewButton_clicked();
        }
      });
      mouseTransformEditViewButton.setIcon(new ImageIcon(getClass().getResource("/org/jwildfire/swing/icons/new/modify_view.png")));
      mouseTransformEditViewButton.setToolTipText("Enable view editing mode (Left mouse: move, right mouse: rotate, middle/wheel: zoom)");
      mouseTransformEditViewButton.setPreferredSize(new Dimension(42, 24));
      previewEastDefaultPanel.add(getMouseTransformMoveTrianglesButton());

      mouseTransformRotateTrianglesButton = new JToggleButton();
      previewEastDefaultPanel.add(mouseTransformRotateTrianglesButton);
      mouseTransformRotateTrianglesButton.setToolTipText("Rotate triangles using the left mouse button");
      mouseTransformRotateTrianglesButton.setPreferredSize(new Dimension(42, 24));
      mouseTransformRotateTrianglesButton.setIcon(new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/object-rotate-right-3.png")));

      mouseTransformScaleTrianglesButton = new JToggleButton();
      previewEastDefaultPanel.add(mouseTransformScaleTrianglesButton);
      mouseTransformScaleTrianglesButton.setToolTipText("Scale triangles using the left mouse button");
      mouseTransformScaleTrianglesButton.setPreferredSize(new Dimension(42, 24));
      mouseTransformScaleTrianglesButton.setIcon(new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/arrow-inout.png")));

      mouseTransformEditPointsButton = new JToggleButton();
      previewEastDefaultPanel.add(mouseTransformEditPointsButton);
      mouseTransformEditPointsButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          expandGradientEditorFncPnl(false);
          tinaController.mouseTransformEditPointsButton_clicked();
        }
      });
      mouseTransformEditPointsButton.setIcon(new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/edit_triangle_points.png")));
      mouseTransformEditPointsButton.setToolTipText("Enable free triangle editing mode");
      mouseTransformEditPointsButton.setPreferredSize(new Dimension(42, 24));

      mouseTransformEditTriangleViewButton = new JToggleButton();
      previewEastDefaultPanel.add(mouseTransformEditTriangleViewButton);
      mouseTransformEditTriangleViewButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          expandGradientEditorFncPnl(false);
          tinaController.mouseTransformTriangleViewButton_clicked();
View Full Code Here

   *  
   * @return javax.swing.JToggleButton 
   */
  private JToggleButton getMouseTransformMoveTrianglesButton() {
    if (mouseTransformMoveTrianglesButton == null) {
      mouseTransformMoveTrianglesButton = new JToggleButton();
      mouseTransformMoveTrianglesButton.setSelected(true);
      mouseTransformMoveTrianglesButton.setPreferredSize(new Dimension(42, 24));
      mouseTransformMoveTrianglesButton.setToolTipText("Move triangles using the left mouse button (right mouse: rotate, mouse wheel: scale)");
      mouseTransformMoveTrianglesButton.setIcon(new ImageIcon(TinaInternalFrame.class.getResource("/org/jwildfire/swing/icons/new/edit_triangle.png")));
      mouseTransformMoveTrianglesButton.addActionListener(new java.awt.event.ActionListener() {
View Full Code Here

TOP

Related Classes of javax.swing.JToggleButton$ToggleButtonModel

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.