protected void initializeLoggingToolbar() { toolBar.setMargin(new Insets(5, 0, 5, 0)); toolBar.setFloatable(false); toolBar.add(copyButton); copyButton.setFocusable(false); copyButton.setEnabled(false); copyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { StringBuilder sb = new StringBuilder(); List<StateVariableValue> messages = getSelectedValue(); for (StateVariableValue message : messages) { sb.append(message.toString()).append("\n"); } Application.copyToClipboard(sb.toString()); } }); toolBar.setFloatable(false); toolBar.add(copyButton); toolBar.add(Box.createHorizontalGlue()); }
button.setUI(new BasicButtonUI()); button.setContentAreaFilled(false); button.setFocusable(false); button.setBorder(null); button.setBorderPainted(false);
protected void initializeToolBar(LogController.Expiration expiration) { configureButton.setFocusable(false); configureButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clearButton.setFocusable(false); clearButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { copyButton.setFocusable(false); copyButton.setEnabled(false); copyButton.addActionListener(new ActionListener() { expandButton.setFocusable(false); expandButton.setEnabled(false); expandButton.addActionListener(new ActionListener() { pauseButton.setFocusable(false); pauseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {
public URIPanel() { super(); setBorder(BorderFactory.createTitledBorder("Current URI")); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(uriTextField); setButton.setFocusable(false); add(setButton); }
useButton.setFocusable(false); toolbar.add(useButton); monitorButton.setFocusable(false); toolbar.add(monitorButton); invokeButton.setFocusable(false); toolbar.add(invokeButton); queryButton.setFocusable(false); toolbar.add(queryButton); copyButton.setFocusable(false); toolbar.add(copyButton); closeButton.setFocusable(false); toolbar.add(closeButton);
button.setIcon(new ImageIcon(scaledImage)); button.putClientProperty(SubstanceSynapse.FLAT_LOOK, Boolean.TRUE); button.setFocusable(false); button.addActionListener(e ->
north.add(zoomMore); north.add(zoomLess); copy.setFocusable(false); copy.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { next.setFocusable(false); next.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { previous.setFocusable(false); previous.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { zoomMore.setFocusable(false); zoomMore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { zoomLess.setFocusable(false); zoomLess.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) {
statusIconButton.setFocusable(false);
colorPickerBtn.setFocusable(false); colorPickerBtn.setBackground(existingColor); colorPickerBtn.addMouseListener(new MouseAdapter()
BufferedImage startButton = ImageIO.read(getClass().getResource("/icons/standard/buttons/start_backup.png")); BufferedImage startButtonHover = ImageIO.read(getClass().getResource("/icons/standard/buttons/start_backup_hover.png")); BufferedImage startButtonActive = ImageIO.read(getClass().getResource("/icons/standard/buttons/start_backup_active.png")); JButton startBackupButton = new JButton(new ImageIcon(startButton)); startBackupButton.setRolloverIcon(new ImageIcon(startButtonHover)); startBackupButton.setPressedIcon(new ImageIcon(startButtonActive)); startBackupButton.setBorder(BorderFactory.createEmptyBorder()); startBackupButton.setContentAreaFilled(false); startBackupButton.setFocusable(false);
copyURIButton.setFocusable(false); copyURIButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { copyProtocolInfoButton.setFocusable(false); copyProtocolInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {
btnConnect.setFocusable(false); btnConnect.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnConnect.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnSendMessage.setFocusable(false); btnSendMessage.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnSendMessage.setText("Send Message");
btnPreferences.setText("Preferences"); btnPreferences.setToolTipText("By changing the settings in the preferences window you can adjust the look and behaviour of xmage."); btnPreferences.setFocusable(false); btnPreferences.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); btnPreferences.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnConnect.setFocusable(false); btnConnect.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); btnConnect.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnDeckEditor.setText("Deck Editor"); btnDeckEditor.setToolTipText("Start the deck editor to create or modify decks."); btnDeckEditor.setFocusable(false); btnDeckEditor.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); btnDeckEditor.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnCollectionViewer.setText("Viewer"); btnCollectionViewer.setToolTipText("Card viewer to show the cards of sets. "); btnCollectionViewer.setFocusable(false); btnCollectionViewer.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); btnCollectionViewer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnSendFeedback.setText("Feedback"); btnSendFeedback.setToolTipText("Send some feedback to the developers."); btnSendFeedback.setFocusable(false); btnSendFeedback.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); btnSendFeedback.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnSymbols.setText("Symbols");
/** * Creates a small 'close' JButton with close icon, rollover icon and pressed icon according to Look and Feel * * @return JButton with close icons. */ public static JButton createCloseButton() { JButton closeButton = new JButton(); int size = 16; closeButton.setPreferredSize(new Dimension(size, size)); closeButton.setContentAreaFilled(false); closeButton.setFocusable(false); closeButton.setBorder(BorderFactory.createEmptyBorder()); closeButton.setBorderPainted(false); closeButton.setRolloverEnabled(true); closeButton.setIcon(ImageUtilities.image2Icon(getCloseTabImage())); closeButton.setRolloverIcon(ImageUtilities.image2Icon(getCloseTabRolloverImage())); closeButton.setPressedIcon(ImageUtilities.image2Icon(getCloseTabPressedImage())); return closeButton; }
/** * Creates a big 'close' JButton with close icon, rollover icon and pressed icon according to Look and Feel * * @return JButton with close icons. */ public static JButton createBigCloseButton() { JButton closeButton = new JButton(); int size = 19; closeButton.setPreferredSize(new Dimension(size, size)); closeButton.setContentAreaFilled(false); closeButton.setFocusable(false); closeButton.setBorder(BorderFactory.createEmptyBorder()); closeButton.setBorderPainted(false); closeButton.setRolloverEnabled(true); closeButton.setIcon(ImageUtilities.image2Icon(getBigCloseTabImage())); closeButton.setRolloverIcon(ImageUtilities.image2Icon(getBigCloseTabRolloverImage())); closeButton.setPressedIcon(ImageUtilities.image2Icon(getBigCloseTabPressedImage())); return closeButton; }
public void init(UUID gameId, UUID playerId, BigCard bigCard, int priorityTime) { this.gameId = gameId; this.playerId = playerId; this.bigCard = bigCard; cheat.setVisible(SessionHandler.isTestMode()); cheat.setFocusable(false); flagName = null; if (priorityTime > 0) { long delay = 1000L; timer = new PriorityTimer(priorityTime, delay, () -> { // do nothing }); final PriorityTimer pt = timer; timer.setTaskOnTick(() -> { int priorityTimeValue = pt.getCount(); String text = getPriorityTimeLeftString(priorityTimeValue); PlayerPanelExt.this.avatar.setTopText(text); PlayerPanelExt.this.timerLabel.setText(text); PlayerPanelExt.this.avatar.repaint(); }); timer.init(gameId); } }
btnConcede.setIcon(new ImageIcon(ImageManagerImpl.instance.getConcedeButtonImage())); btnConcede.setToolTipText("Concede the current game."); btnConcede.setFocusable(false); btnConcede.addMouseListener(new MouseAdapter() { @Override btnSwitchHands.setBorder(new EmptyBorder(0, 0, 0, 0)); btnSwitchHands.setIcon(new ImageIcon(ImageManagerImpl.instance.getSwitchHandsButtonImage())); btnSwitchHands.setFocusable(false); btnSwitchHands.setToolTipText("Switch between your hand cards and hand cards of controlled players."); btnSwitchHands.addMouseListener(new MouseAdapter() { btnStopWatching.setBorder(new EmptyBorder(0, 0, 0, 0)); btnStopWatching.setIcon(new ImageIcon(ImageManagerImpl.instance.getStopWatchButtonImage())); btnStopWatching.setFocusable(false); btnStopWatching.setToolTipText("Stop watching this game."); btnStopWatching.addMouseListener(new MouseAdapter() {
btnExpansionSearch.setToolTipText("Fast search set or expansion"); btnExpansionSearch.setAlignmentX(1.0F); btnExpansionSearch.setFocusable(false); btnExpansionSearch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnExpansionSearch.setPreferredSize(new java.awt.Dimension(23, 23)); btnBooster.setFocusable(false); btnBooster.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnBooster.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnClear.setFocusable(false); btnClear.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnClear.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnQuickStart.setFocusable(false); btnQuickStart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnQuickStart.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
public static JButton createButton(ImageIcon icon, String tip, ActionListener action ) { JButton btn = new JButton(); btn.setToolTipText(tip); btn.setIcon(icon); btn.setMargin(new Insets(0, 0, 0, 0)); if (action != null) btn.addActionListener(action); btn.setFocusable(false); btn.setFocusPainted(false); return btn; }