muteButton.setVerticalTextPosition(JToggleButton.BOTTOM); muteButton.setHorizontalTextPosition(JToggleButton.CENTER); muteButton.setFocusable(false);
tbRed.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); tbRed.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/color_red.png"))); // NOI18N tbRed.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); tbRed.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tbGreen.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/color_green.png"))); // NOI18N tbGreen.setVerifyInputWhenFocusTarget(false); tbGreen.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); tbGreen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tbBlue.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); tbBlue.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/color_blue.png"))); // NOI18N tbBlue.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); tbBlue.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tbBlack.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); tbBlack.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/color_black.png"))); // NOI18N tbBlack.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); tbBlack.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tbWhite.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); tbWhite.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/color_white.png"))); // NOI18N tbWhite.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); tbWhite.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
btnStateWaiting.setRequestFocusEnabled(false); btnStateWaiting.setVerifyInputWhenFocusTarget(false); btnStateWaiting.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnStateWaiting.addActionListener(evt -> btnFilterActionPerformed(evt)); filterBar1.add(btnStateWaiting); btnStateActive.setRequestFocusEnabled(false); btnStateActive.setVerifyInputWhenFocusTarget(false); btnStateActive.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnStateActive.addActionListener(evt -> btnFilterActionPerformed(evt)); filterBar1.add(btnStateActive); btnStateFinished.setRequestFocusEnabled(false); btnStateFinished.setVerifyInputWhenFocusTarget(false); btnStateFinished.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnStateFinished.addActionListener(evt -> btnStateFinishedActionPerformed(evt)); filterBar1.add(btnStateFinished); btnTypeMatch.setRequestFocusEnabled(false); btnTypeMatch.setVerifyInputWhenFocusTarget(false); btnTypeMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnTypeMatch.addActionListener(evt -> btnFilterActionPerformed(evt)); filterBar1.add(btnTypeMatch); btnSkillBeginner.setRequestFocusEnabled(false); btnSkillBeginner.setVerifyInputWhenFocusTarget(false); btnSkillBeginner.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnSkillBeginner.addActionListener(evt -> btnFilterActionPerformed(evt)); filterBar1.add(btnSkillBeginner);
/** * Return the pauseButton * * @return JToggleButton */ private JToggleButton getPauseButton() { if (pauseButton == null) { pauseButton = new JToggleButton("Pause/Debug"); pauseButton.setMnemonic('P'); pauseButton.setHorizontalTextPosition(SwingConstants.CENTER); pauseButton.setVerticalTextPosition(SwingConstants.BOTTOM); pauseButton.addActionListener(eventHandler); } return pauseButton; }
private static JToggleButton createToggleButton(String toolTipText, ImageIcon icon, java.awt.event.ActionListener actionListener) { JToggleButton btn = new JToggleButton(); btn.setMargin(new Insets(0, 0, 0, 0)); btn.setPreferredSize(new Dimension(30, 30)); btn.setIcon(icon); btn.setMinimumSize(new Dimension(30, 30)); btn.setVerticalTextPosition(SwingConstants.BOTTOM); btn.setSelected(false); btn.setToolTipText(toolTipText); btn.setHorizontalTextPosition(SwingConstants.CENTER); btn.setFont(new java.awt.Font("SansSerif", 0, 10)); btn.setMaximumSize(new Dimension(30, 30)); btn.addActionListener(actionListener); return btn; }
private void addButton(String title, ImageIcon icon, final Component component) { Action action = new AbstractAction(title, icon) { private static final long serialVersionUID = -5307503386163952433L; @Override public void actionPerformed(ActionEvent e) { show(component); } }; JToggleButton button = new JToggleButton(action); button.setHorizontalTextPosition(JButton.CENTER); button.setVerticalTextPosition(JButton.BOTTOM); button.setUI(new ButtonBarButtonUI()); buttonBar.add(button); buttonGroup.add(button); if (buttonGroup.getSelection() == null) { button.setSelected(true); show(component); } }
grayedButton.setFocusable(false); grayedButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); grayedButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); grayedButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { excludeButton.setFocusable(false); excludeButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); excludeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); excludeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
grayedButton.setFocusable(false); grayedButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); grayedButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); grayedButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { excludeButton.setFocusable(false); excludeButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); excludeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); excludeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
jToggleButton1.setFocusable(false); jToggleButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jToggleButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jToggleButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
Methods.invokeIfExists(tb, "setFocusable", false); tb.setHorizontalTextPosition(SwingConstants.CENTER); tb.setVerticalTextPosition(SwingConstants.BOTTOM); tb.setFont(UIManager.getFont("ColorChooser.font")); tb.putClientProperty("Quaqua.Button.style", "toolBarTab");
pauseButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); pauseButton.setMargin(new java.awt.Insets(2, 3, 2, 3)); pauseButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jToolBar1.add(pauseButton);
button.setVerticalTextPosition(AbstractButton.BOTTOM); button.setHorizontalTextPosition(AbstractButton.CENTER); button.setContentAreaFilled(false);
Methods.invokeIfExists(tb, "setFocusable", false); tb.setHorizontalTextPosition(SwingConstants.CENTER); tb.setVerticalTextPosition(SwingConstants.BOTTOM); tb.setFont(UIManager.getFont("ColorChooser.font")); tb.putClientProperty("Quaqua.Button.style", "toolBarTab");
button.setVerticalTextPosition(AbstractButton.BOTTOM); button.setHorizontalTextPosition(AbstractButton.CENTER); button.setContentAreaFilled(false);
supertypeButton.setMinimumSize(new java.awt.Dimension(24, 24)); supertypeButton.setPreferredSize(new java.awt.Dimension(24, 24)); supertypeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); supertypeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { subtypeButton.setMinimumSize(new java.awt.Dimension(24, 24)); subtypeButton.setPreferredSize(new java.awt.Dimension(24, 24)); subtypeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); subtypeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
shortCutPanelMyProjectButton.setVerticalTextPosition(JToggleButton.BOTTOM); shortCutPanelMyProjectButton.setAlignmentX(JComponent.CENTER_ALIGNMENT); shortCutPanelMyProjectButton.setPreferredSize(buttonSize);
subtypeButton.setMinimumSize(new java.awt.Dimension(24, 24)); subtypeButton.setPreferredSize(new java.awt.Dimension(24, 24)); subtypeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); subtypeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { supertypeButton.setMinimumSize(new java.awt.Dimension(24, 24)); supertypeButton.setPreferredSize(new java.awt.Dimension(24, 24)); supertypeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); supertypeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { directOnlyButton.setMinimumSize(new java.awt.Dimension(24, 24)); directOnlyButton.setPreferredSize(new java.awt.Dimension(24, 24)); directOnlyButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); directOnlyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { treeButton.setMinimumSize(new java.awt.Dimension(24, 24)); treeButton.setPreferredSize(new java.awt.Dimension(24, 24)); treeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); treeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
shortCutPanelMyProjectButton.setVerticalTextPosition(JToggleButton.BOTTOM); shortCutPanelMyProjectButton.setAlignmentX(JComponent.CENTER_ALIGNMENT); shortCutPanelMyProjectButton.setPreferredSize(buttonSize);
calls.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); calls.addActionListener(new java.awt.event.ActionListener() { callers.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); callers.addActionListener(new java.awt.event.ActionListener() {
graphToggle.setFocusable(false); graphToggle.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); graphToggle.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); graphToggle.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) {