Demos and Usage of javax.swing.AbstractButton.setMargin(Insets m)


   1: 
   2:     public AbstractButton addAction( FWAction action  )
   3:     {
   4:         ...
   5: 
   6:     public AbstractButton addAction( Action action, boolean isToggleAction )
   7:     {
   8:         ...
   9:         AbstractButton btn;
  10:         if ( isToggleAction )
  11:         ...
  12:         btn.setRequestFocusEnabled( false );
  13:         btn.setMargin( GUIUtils.EMPTY_INSETS );

View Full Code Here
   1: 
   2: import javax.swing.AbstractButton;
   3: import javax.swing.BorderFactory;
   4:         ...
   5: 
   6:   private void decoreButton(final AbstractButton _bt){
   7:     _bt.setRequestFocusEnabled(false);
   8:         ...
   9:     _bt.setMargin(INSETS1111);
  10:     _bt.addActionListener(this);
  11:         ...
  12:       if (o != null) {
  13:         if (((AbstractButton) o).getActionCommand().equals(_command))

View Full Code Here
   1: 
   2: import jp.ujihara.javax.swing.AbstractButton;
   3: import jp.ujihara.javax.swing.ButtonModel;
   4:         ...
   5: 
   6:   public int getDefaultTextIconGap(AbstractButton b)
   7:   {
   8:         ...
   9: 
  10:   protected void installDefaults(AbstractButton b)
  11:   {
  12:         ...
  13:     b.setBackground(defaults.getColor("Button.background"));
  14:     b.setMargin(defaults.getInsets("Button.margin"));

View Full Code Here
   1: 
   2: import javax.swing.AbstractButton;
   3: import javax.swing.Action;
   4:         ...
   5:             } else {
   6:                 AbstractButton button = createButton(element, toolbar);
   7:                 button.setFocusable(false);
   8:         ...
   9:                 button.setMargin(TOOLBAR_BUTTON_MARGIN);
  10:                 button.setBorderPainted(false);
  11:         ...
  12: 
  13:     public AbstractButton createButton(Object id, JComponent container) {

View Full Code Here
   1: 
   2:     private void setButton (AbstractButton button, String cmd, String file)
   3:     {
   4:         ...
   5:             button.setIcon(ii24);
   6:         button.setMargin(AppsAction.BUTTON_INSETS);
   7:         button.setPreferredSize(AppsAction.BUTTON_SIZE);
   8:         button.addActionListener(this);

View Full Code Here
   1: 
   2:   protected AbstractButton makeToolbarButton(String tip, String imagename, boolean toggle) {
   3:     ImageIcon imageIcon = new ImageIcon(getImage(imagename));
   4:         ...
   5:     AbstractButton b1;
   6:     if (toggle) {
   7:         ...
   8:     b1.setPreferredSize(buttonDimension);
   9:     b1.setMargin(zeroInsets);
  10:     b1.setToolTipText(tip);

View Full Code Here