Package javax.swing

Examples of javax.swing.DefaultButtonModel


        return createDefaultButtonModel();
    }

    public ButtonModel createDefaultButtonModel()
    {
        return new DefaultButtonModel();
    }
View Full Code Here


        return createDefaultButtonModel();
    }

    public ButtonModel createDefaultButtonModel()
    {
        return new DefaultButtonModel();
    }
View Full Code Here

        htmlSrc.append("</FORM></BODY></HTML>");
        StringReader reader = new StringReader(htmlSrc.toString());
        htmlEditorKit.read(reader, document, 0);

        AttributeSet attrs = document.getElement("1").getAttributes();
        DefaultButtonModel sourceModel1;
        sourceModel1 = (DefaultButtonModel) attrs.getAttribute(StyleConstants
                .ModelAttribute);
        assertEquals(0, sourceModel1.getGroup().getButtonCount());
        attrs = document.getElement("2").getAttributes();
        DefaultButtonModel sourceModel2;
        sourceModel2 = (DefaultButtonModel) attrs.getAttribute(StyleConstants
                .ModelAttribute);
        assertEquals(0, sourceModel2.getGroup().getButtonCount());

        createFormViewWithParent("1");
        assertEquals(0, sourceModel1.getGroup().getButtonCount());
    }
View Full Code Here

  private StateTransitionTracker getTracker(final TreePathId pathId,
      boolean initialRollover, boolean initialSelected) {
    StateTransitionTracker tracker = stateTransitionMultiTracker
        .getTracker(pathId);
    if (tracker == null) {
      ButtonModel model = new DefaultButtonModel();
      model.setSelected(initialSelected);
      model.setRollover(initialRollover);
      tracker = new StateTransitionTracker(this.tree, model);
      tracker.registerModelListeners();
      tracker.setRepaintCallback(new RepaintCallback() {
        @Override
        public TimelineCallback getRepaintCallback() {
View Full Code Here

   * @param b
   *            Associated component.
   */
  protected SubstanceScrollBarUI(JComponent b) {
    super();
    this.thumbModel = new DefaultButtonModel();
    this.thumbModel.setArmed(false);
    this.thumbModel.setSelected(false);
    this.thumbModel.setPressed(false);
    this.thumbModel.setRollover(false);

View Full Code Here

  private StateTransitionTracker getTracker(final int row,
      boolean initialRollover, boolean initialSelected) {
    StateTransitionTracker tracker = stateTransitionMultiTracker
        .getTracker(row);
    if (tracker == null) {
      ButtonModel model = new DefaultButtonModel();
      model.setSelected(initialSelected);
      model.setRollover(initialRollover);
      tracker = new StateTransitionTracker(list, model);
      tracker.registerModelListeners();
      tracker.setRepaintCallback(new RepaintCallback() {
        @Override
        public TimelineCallback getRepaintCallback() {
View Full Code Here

    public DirectionButton (int preferredDiameter)
    {
        _prefdia = preferredDiameter;
        configSize(_prefdia);

        setModel(new DefaultButtonModel());

        addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed (MouseEvent event)
            {
View Full Code Here

  private String[] mouseDownSelection;
 
  /** Creates a new instance of XSvgButton */
  public XSvgButton()
  {
    setModel( new DefaultButtonModel());
    addMouseListener( this );
    addComponentListener( this );
    svgPainter = new XSvgPainter( this );
  }
View Full Code Here

        cbWireframe = new JCheckBox();
        JLabel wfLabel = new JLabel(tr("Wireframe View"), ImageProvider.get("dialogs/mappaint", "wireframe_small"), JLabel.HORIZONTAL);
        wfLabel.setFont(wfLabel.getFont().deriveFont(Font.PLAIN));

        cbWireframe.setModel(new DefaultButtonModel() {
            @Override
            public void setSelected(boolean b) {
                super.setSelected(b);
                tblStyles.setEnabled(!b);
                onoffAction.updateEnabledState();
View Full Code Here

     * Default Constructor - only friendly access!
     */
    ComboBoxButton()
    {
      super();
      DefaultButtonModel model = new DefaultButtonModel()
      {
        public void setArmed(boolean armed)
        {
          super.setArmed(isPressed() ? true : armed);
        }
View Full Code Here

TOP

Related Classes of javax.swing.DefaultButtonModel

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.