private JButton createExampleButton(final CommonApp commonApp) { String iconResource = commonApp.getIconResource(); Icon icon = iconResource == null ? new EmptyIcon() : new ImageIcon(getClass().getResource(iconResource)); JButton button = new JButton(new AbstractAction(commonApp.getName(), icon) { @Override public void actionPerformed(ActionEvent e) { commonApp.init(OptaPlannerExamplesApp.this, false); } }); button.setHorizontalAlignment(JButton.LEFT); button.setHorizontalTextPosition(JButton.RIGHT); button.setVerticalTextPosition(JButton.CENTER); button.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { descriptionTextArea.setText(commonApp.getDescription()); } @Override public void mouseExited(MouseEvent e) { descriptionTextArea.setText(""); } }); return button; }
this.xhdpiButton.setVerticalTextPosition(SwingConstants.BOTTOM); this.xhdpiButton.setHorizontalTextPosition(SwingConstants.CENTER); this.xhdpiButton.setHorizontalAlignment(SwingConstants.CENTER); this.xhdpiButton.setIcon(this.blueArrow); this.xhdpiButton.setSelectedIcon(this.redArrow);
jButton_Record.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jButton_Record.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jButton_Record.setMaximumSize(new java.awt.Dimension(95, 25)); jButton_Play.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jButton_Play.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jButton_Play.setMaximumSize(new java.awt.Dimension(95, 25));
jButton_Record.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jButton_Record.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jButton_Record.setMaximumSize(new java.awt.Dimension(95, 25)); jButton_Play.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jButton_Play.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jButton_Play.setMaximumSize(new java.awt.Dimension(95, 25));
button.setHorizontalAlignment(JButton.LEFT);
labelIsCheckingUpdate.setHorizontalAlignment(SwingConstants.LEFT); labelIsCheckingUpdate.setBorderPainted(false); labelIsCheckingUpdate.setContentAreaFilled(false); labelIsReportingBugs.setHorizontalAlignment(SwingConstants.LEFT); labelIsReportingBugs.setBorderPainted(false); labelIsReportingBugs.setContentAreaFilled(false); labelIsEvading.setHorizontalAlignment(SwingConstants.LEFT); labelIsEvading.setBorderPainted(false); labelIsEvading.setContentAreaFilled(false); labelIsFollowingRedirection.setHorizontalAlignment(SwingConstants.LEFT); labelIsFollowingRedirection.setBorderPainted(false); labelIsFollowingRedirection.setContentAreaFilled(false); labelTestConnection.setHorizontalAlignment(SwingConstants.LEFT); labelTestConnection.setBorderPainted(false); labelTestConnection.setContentAreaFilled(false); labelParseForm.setHorizontalAlignment(SwingConstants.LEFT); labelParseForm.setBorderPainted(false); labelParseForm.setContentAreaFilled(false); buttonIsUsingProxy.setHorizontalAlignment(SwingConstants.LEFT); buttonIsUsingProxy.setBorderPainted(false); buttonIsUsingProxy.setContentAreaFilled(false); buttonIsUsingProxyHttps.setHorizontalAlignment(SwingConstants.LEFT);
jButtonFooterNext.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jButtonFooterNext.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButtonFooterNext.setOpaque(false);
protected JButton addAction(final JComponent arrowLinkPopup, Action action) { JButton comp = new JButton(action); comp.setHorizontalAlignment(JButton.LEFT); addPopupComponent (arrowLinkPopup, null, comp); return comp; }
private JButton makeJButton(String label, String toolTip, Color bgColor, final Color highlight) { JButton button = new JButton(label); button.setToolTipText(toolTip); button.setBackground(bgColor); button.setHorizontalAlignment(JButton.CENTER); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { Highlighter.shadeSymmetric(currentCell, highlight); } }); return button; }
public ScriptComboBoxEditor() { showEditorBtn = new JButton(); script = ""; setButtonText(); showEditorBtn.setHorizontalAlignment(SwingConstants.LEFT); showEditorBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { editScript(false); } }); actionListeners = new LinkedList<ActionListener>(); minimumSize = new Dimension(600, 400); bounds = null; }
private JButton getAcceptButton() { if (acceptButton == null) { acceptButton = new JButton(); acceptButton.setText(OpenEHRLanguageManager.getMessage("Accept")); acceptButton.setIcon(OpenEHRImageUtil.ACCEPT_ICON); acceptButton.setEnabled(true); acceptButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); acceptButton.addActionListener(getAcceptChangesAction()); } return acceptButton; }
protected JButton getAcceptButton() { if (acceptButton == null) { acceptButton = new JButton(); acceptButton.setText(OpenEHRLanguageManager.getMessage("Accept")); acceptButton.setIcon(OpenEHRImageUtil.ACCEPT_ICON); acceptButton.setEnabled(true); acceptButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); acceptButton.addActionListener(getAcceptChangesAction()); } return acceptButton; }
private JButton getAcceptButton() { if (acceptButton == null) { acceptButton = new JButton(); acceptButton.setText(OpenEHRLanguageManager.getMessage("Accept")); acceptButton.setIcon(OpenEHRImageUtil.ACCEPT_ICON); acceptButton.setEnabled(true); acceptButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); acceptButton.addActionListener(getAcceptChangesAction()); } return acceptButton; }
private JButton getAcceptButton() { if (acceptButton == null) { acceptButton = new JButton(); acceptButton.setText(OpenEHRLanguageManager.getMessage("Accept")); acceptButton.setIcon(OpenEHRImageUtil.ACCEPT_ICON); acceptButton.setEnabled(true); acceptButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); acceptButton.addActionListener(getAcceptChangesAction()); } return acceptButton; }
private void addUriWithoutTitle(Box box, String uriProperty) { try { final String urlText = ResourceController.getResourceController().getProperty(uriProperty); URI uri = new URI(urlText); JButton uriButton = UITools.createHtmlLinkStyleButton(uri, urlText); uriButton.setHorizontalAlignment(SwingConstants.LEADING); box.add(uriButton); } catch (URISyntaxException e1) { } }
public JComponent create (UI ui, Element e) { JButton button = new JButton (e.getText()); button.setHorizontalAlignment(JLabel.CENTER); button.setBorder(new EmptyBorder(3, 3, 3, 3)); String font = e.getAttributeValue ("font"); if (font != null) button.setFont (Font.decode (font)); return button; } }
private void addUri(Box box, String uriProperty, String message) { try { URI uri; uri = new URI( ResourceController.getResourceController().getProperty(uriProperty)); JButton uriButton = UITools.createHtmlLinkStyleButton(uri, message); uriButton.setAlignmentX(Component.LEFT_ALIGNMENT); uriButton.setHorizontalAlignment(SwingConstants.LEADING); box.add(uriButton); } catch (URISyntaxException e1) { } } }
private JButton getOperationButton(String title, String iconPath) { JButton button = this.componentsFactory.getButton(title); button.setPreferredSize(new Dimension(210, 35)); button.setForeground(AppThemeColor.TEXT_DEFAULT); button.setHorizontalAlignment(SwingConstants.LEFT); button.setBackground(AppThemeColor.ADR_BG); button.setFont(this.componentsFactory.getFont(FontStyle.BOLD, 16f)); button.setIcon(this.componentsFactory.getIcon(iconPath, 22)); button.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createMatteBorder(1, 1, 1, 1, AppThemeColor.ADR_PANEL_BORDER), BorderFactory.createEmptyBorder(2, 10, 2, 2))); return button; }
private static JButton createLinkButton() { JButton linkButton = new JButton("<HTML><FONT color=\"#000099\"><U>" + HOME_PAGE + "</U></FONT></HTML>"); linkButton.setHorizontalAlignment(SwingConstants.CENTER); linkButton.setBorderPainted(false); linkButton.setFocusPainted(false); linkButton.setOpaque(false); linkButton.setBackground(box.getBackground()); linkButton.setAlignmentX(Component.CENTER_ALIGNMENT); linkButton.addActionListener(new OpenInBrowserAction(null, HOME_PAGE)); return linkButton; }
private JButton addStyleButton(DefaultFormBuilder formBuilder, String label, AFreeplaneAction action) { final JButton button = new JButton(){ private static final long serialVersionUID = 1L; { setUI(BasicButtonUI.createUI(this)); } }; button.addActionListener(action); button.setHorizontalAlignment(SwingConstants.LEFT); final String labelText = TextUtils.getText(label); UITools.addTitledBorder(button, labelText, StyleEditorPanel.FONT_SIZE); TranslatedElement.BORDER.setKey(button, label); formBuilder.append(button, formBuilder.getColumnCount()); formBuilder.nextLine(); return button; }