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); }
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); }
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); }
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); }
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); } }
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); }
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); }
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); }
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); }
/** * 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); }
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); } } }); }
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); }
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); } }); }
/** * 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); }
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); }
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); }
/** * 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)); }
/** * 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); }
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); }
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(); } }); }
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); }
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); }
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; }
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); }
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); }