Java 类javax.swing.plaf.basic.BasicButtonUI 实例源码

项目:tn5250j    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText(LangTool.getString("popup.close"));
    // Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    // Make it transparent
    setContentAreaFilled(false);
    // No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    // Making nice rollover effect
    // we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    // Close the proper tab by clicking the button
    addActionListener(this);
}
项目:marathonv5    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    // Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    // Make it transparent
    setContentAreaFilled(false);
    // No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    // Making nice rollover effect
    // we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    // Close the proper tab by clicking the button
    addActionListener(this);
}
项目:scratch-bench    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:SmartQQ4IntelliJ    文件:ClosableTabHost.java   
public TabButton() {
    // super(SmartIcons.close);
    int size = 16;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    setOpaque(false);
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEmptyBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    // addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:JavaGraph    文件:TabLabel.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText(TabLabel.this.kind.getName());
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
    if (TabLabel.this.kind != Kind.RESOURCE && TabLabel.this.kind != Kind.LIST) {
        setIcon(Icons.PIN_ICON);
    }
}
项目:ramus    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    // Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    // Make it transparent
    setContentAreaFilled(false);
    // No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    // Making nice rollover effect
    // we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    // Close the proper tab by clicking the button
    addActionListener(this);
}
项目:Mujeed-Arabic-Prolog    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    //setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:audiveris    文件:ButtonTabComponent.java   
public TabButton ()
{
    final int size = 13; // Button side length
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");

    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());

    //Make it transparent
    setContentAreaFilled(false);

    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);

    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);

    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:xtunnel    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:djigger    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:djigger    文件:CustomButton.java   
public CustomButton(String toolTip) {
    setToolTipText(toolTip);
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);

}
项目:eva2    文件:TabbedFrameMaker.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("Hide this Tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:geoxygene    文件:AbstractMainFrame.java   
/**
 * Default constructor.
 */
public TabButton() {
    super(new ImageIcon(GeOxygeneApplication.class.getResource(
            "/images/icons/16x16/delete.png").getPath()));
    this.setToolTipText("close this tab");
    // Make the button looks the same for all Laf's
    this.setUI(new BasicButtonUI());
    // Make it transparent
    this.setContentAreaFilled(false);
    // No need to be focusable
    this.setFocusable(false);
    this.setBorder(BorderFactory.createEtchedBorder());
    this.setBorderPainted(false);
    // Making nice rollover effect
    // we use the same listener for all buttons
    this.addMouseListener(buttonMouseListener);
    this.setRolloverEnabled(true);
    // Close the proper tab by clicking the button
    this.addActionListener(this);
}
项目:JavaSerialKiller    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:oblivion-netbeans-plugin    文件:TabWithCloseButton.java   
public ButtonClose(JTabbedPane pane, TabWithCloseButton buttonClose) {
    panel = pane;
    this.buttonClose = buttonClose;
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText(Bundle.TabWithCloseButton_ToolTipCloseTab());
    setUI(new BasicButtonUI());
    setContentAreaFilled(false);
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    addMouseListener(this);
    setRolloverEnabled(true);
    addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            int index = panel.indexOfTabComponent(ButtonClose.this.buttonClose);
            if (index != -1) {
                TestResultTopComponent.closeTab(index);
            }
        }
    });
}
项目:cuba    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText(messages.getMainMessage("closeTabToolTip"));
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    addAncestorListener(ancestorListener);

    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:JxMaps-Examples    文件:MapOptionsExample.java   
private void customizeCheckBox(final JCheckBox checkBox) {
    Font robotoPlain13 = new Font("Roboto", 0, 13);
    checkBox.setUI(new BasicButtonUI() {
        @Override
        protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) {
            textRect.translate(28, 0);
            super.paintText(g, b, textRect, text);
        }
    });
    checkBox.setFont(robotoPlain13);
    checkBox.setForeground(checkBox.isSelected()?  FOREGROUND_COLOR_SELECTED : FOREGROUND_COLOR);
    checkBox.setOpaque(false);
    checkBox.setIcon(new ImageIcon(MapOptionsExample.class.getResource("res/checkbox_0.png")));
    checkBox.setSelectedIcon(new ImageIcon(MapOptionsExample.class.getResource("res/checkbox_1.png")));
    checkBox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            checkBox.setForeground(checkBox.isSelected()?  FOREGROUND_COLOR_SELECTED : FOREGROUND_COLOR);
        }
    });
}
项目:SWAT20    文件:SwatTabView.java   
public TabButton() {
                int size = 17;
                setPreferredSize(new Dimension(size, size));
                setToolTipText("close this tab");
                //Make the button looks the same for all Laf's
                setUI(new BasicButtonUI());
                //Make it transparent
                setContentAreaFilled(false);
                //No need to be focusable
                setFocusable(false);
                setBorder(BorderFactory.createEtchedBorder());
                setBorderPainted(false);
//Making nice rollover effect
                //we use the same listener for all buttons
                addMouseListener(buttonMouseListener);
                setRolloverEnabled(true);
                //Close the proper tab by clicking the button
                addActionListener(this);
        }
项目:binnavi    文件:ButtonTabComponent.java   
/**
 * Creates a new tab button object.
 */
public TabButton() {
  final int size = 17;
  setPreferredSize(new Dimension(size, size));
  setToolTipText("Close this tab.");
  // Make the button look the same for all Laf's
  setUI(new BasicButtonUI());
  // Make it transparent
  setContentAreaFilled(false);
  // No need to be focusable
  setFocusable(false);
  setBorder(BorderFactory.createBevelBorder(1)); // createEtchedBorder());
  setBorderPainted(false);
  // Making nice rollover effect
  // we use the same listener for all buttons
  addMouseListener(buttonMouseListener);
  setRolloverEnabled(true);
  // Close the proper tab by clicking the button
  addActionListener(this);
}
项目:Keel3.0    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:stickes    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:KEEL    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:JetUML    文件:ButtonTabComponent.java   
TabButton() 
{
    int size = TAB_SIZE;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(BUTTON_MOUSE_LISTENER);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:youscope    文件:MeasurementControlManager.java   
public TabButton() 
{
    int size = 16;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("Close measurement");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
}
项目:tellapic    文件:ChatViewTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:jMovieManager    文件:ExtendedSearchGUI.java   
/**
    * Methode zum Anpassen der GUI an das neue Look and Feel
    **/
    @Override
   public void changeUI(){
        jPanel2.setBackground(ColorInterface.list_tree_Background);
        jScrollPane1.getHorizontalScrollBar().setUI((MyBasicScrollBarUI)MyBasicScrollBarUI.createUI(jList1)); 
        jScrollPane1.getVerticalScrollBar().setUI((MyBasicScrollBarUI)MyBasicScrollBarUI.createUI(jList1));  
        jScrollPane2.getHorizontalScrollBar().setUI((MyBasicScrollBarUI)MyBasicScrollBarUI.createUI(jPanel2));  
        jScrollPane2.getVerticalScrollBar().setUI((MyBasicScrollBarUI)MyBasicScrollBarUI.createUI(jPanel2));   
//                   jButton1.setUI((MyBasicButtonUI)MyBasicButtonUI.createUI(jButton1));
//                   jButton2.setUI((MyBasicButtonUI)MyBasicButtonUI.createUI(jButton2));

        jButton3.setUI((BasicButtonUI)MyBasicMenuButtonUI.createUI(jButton3));
        jButton6.setUI((BasicButtonUI)MyBasicMenuButtonUI.createUI(jButton6));
        jButton7.setUI((BasicButtonUI)MyBasicMenuButtonUI.createUI(jButton7));
        jButton8.setUI((BasicButtonUI)MyBasicMenuButtonUI.createUI(jButton8));
        jButton9.setUI((BasicButtonUI)MyBasicMenuButtonUI.createUI(jButton9));
    }
项目:pasket    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:MeteoInfoLib    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:eva2    文件:TabbedFrameMaker.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("Hide this Tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:javamelody    文件:MButtonTabComponent.java   
/**
 * Constructor.
 */
TabButton() {
    super();
    final int size = 17;
    setPreferredSize(new Dimension(size, size));
    //          setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(BUTTON_MOUSE_LISTENER);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:tn5250j    文件:ButtonTabComponent.java   
public TabButton() {
   int size = 17;
   setPreferredSize(new Dimension(size, size));
   setToolTipText("close this tab");
   // Make the button looks the same for all Laf's
   setUI(new BasicButtonUI());
   // Make it transparent
   setContentAreaFilled(false);
   // No need to be focusable
   setFocusable(false);
   setBorder(BorderFactory.createEtchedBorder());
   setBorderPainted(false);
   // Making nice rollover effect
   // we use the same listener for all buttons
   addMouseListener(buttonMouseListener);
   setRolloverEnabled(true);
   // Close the proper tab by clicking the button
   addActionListener(this);
}
项目:JCEditor    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("Fechar aba");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:incubator-taverna-workbench    文件:Tab.java   
public CloseWorkflowButton() {
    setUI(new BasicButtonUI());
    setPreferredSize(new Dimension(size, size));
    setMinimumSize(new Dimension(size, size));
    setContentAreaFilled(false);
    setFocusable(false);
    setToolTipText("Close workflow");

    setRolloverEnabled(true);
    addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            closeTabAction();
        }
    });
}
项目:synthetic-log-generator    文件:ButtonTabComponent.java   
public TabButton() {
    final int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("Close this tab");
    // Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    // Make it transparent
    setContentAreaFilled(false);
    // No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    // Making nice rollover effect
    // we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    // Close the proper tab by clicking the button
    addActionListener(this);
}
项目:expline    文件:FilterPanel.java   
public AddButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("create a new condition");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(null);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:expline    文件:FilterPanel.java   
public MinusButton(FilterPanel filterPanel) {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("Remove condition");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(null);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);

    this.filterPanel = filterPanel;
}
项目:drawfbp    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setRequestFocusEnabled(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:beastshell    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}
项目:Introspect-Framework    文件:TabHeader.java   
public TabButton() {
    int size = 18;
    setPreferredSize(new Dimension(size, size));
    setToolTipText(languageProvider.getText("Close this tab"));
    // Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    // Make it transparent
    setContentAreaFilled(false);
    // No need to be focusable
    setFocusable(false);
    // Making nice rollover effect
    // we use the same listener for all buttons
    setRolloverEnabled(true);
    // Close the proper tab by clicking the button
    addActionListener(this);
}
项目:katering    文件:ButtonTabComponent.java   
public TabButton() {
    int size = 17;
    setPreferredSize(new Dimension(size, size));
    setToolTipText("close this tab");
    //Make the button looks the same for all Laf's
    setUI(new BasicButtonUI());
    //Make it transparent
    setContentAreaFilled(false);
    //No need to be focusable
    setFocusable(false);
    setBorder(BorderFactory.createEtchedBorder());
    setBorderPainted(false);
    //Making nice rollover effect
    //we use the same listener for all buttons
    addMouseListener(buttonMouseListener);
    setRolloverEnabled(true);
    //Close the proper tab by clicking the button
    addActionListener(this);
}