private void initializeComponents (String chartTitle) { JPanel contentPanel = getContentPanel(); { chart = new Chart(chartTitle) { public void pointsChanged () { value.setTimeline(chart.getValuesX()); value.setScaling(chart.getValuesY()); } }; chart.setPreferredSize(new Dimension(150, 62)); contentPanel.add(chart, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); } { expandButton = new JButton("+"); expandButton.setBorder(BorderFactory.createEmptyBorder(4, 10, 4, 10)); contentPanel.add(expandButton, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0)); } } }
button.setContentAreaFilled(false); button.setFocusable(false); button.setBorder(null); button.setBorderPainted(false); button.addActionListener(e -> closeCodePanel(contentPanel));
btnMorphAnimation.setPreferredSize(new Dimension(35, 35)); btnMorphAnimation.setBorderPainted(false); btnMorphAnimation.setBorder(null); btnMorphAnimation.setMargin(new Insets(0, 0, 0, 0)); btnMorphAnimation.setContentAreaFilled(false);
private void initializeComponents (String chartTitle) { JPanel contentPanel = getContentPanel(); { chart = new Chart(chartTitle) { public void pointsChanged () { value.setTimeline(chart.getValuesX()); value.setScaling(chart.getValuesY()); } }; chart.setPreferredSize(new Dimension(150, 62)); contentPanel.add(chart, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); } { expandButton = new JButton("+"); expandButton.setBorder(BorderFactory.createEmptyBorder(4, 10, 4, 10)); contentPanel.add(expandButton, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0)); } } }
this.xhdpiButton.setIcon(this.blueArrow); this.xhdpiButton.setSelectedIcon(this.redArrow); this.xhdpiButton.setBorder(null); this.xhdpiButton.setContentAreaFilled(false); inputPanel.add(this.xhdpiButton, BorderLayout.CENTER);
private void initializeComponents () { JPanel contentPanel = getContentPanel(); { label = new JLabel("Value:"); contentPanel.add(label, new GridBagConstraints(2, 2, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0)); } { minSlider = new Slider(0, -99999, 99999, 1, -400, 400); contentPanel.add(minSlider, new GridBagConstraints(3, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); } { maxSlider = new Slider(0, -99999, 99999, 1, -400, 400); contentPanel.add(maxSlider, new GridBagConstraints(4, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0)); } { rangeButton = new JButton("<"); rangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); contentPanel.add(rangeButton, new GridBagConstraints(5, 2, 1, 1, 1.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); } } }
clearButton.setFont(FontManager.getRunescapeBoldFont()); clearButton.setForeground(ColorScheme.PROGRESS_ERROR_COLOR); clearButton.setBorder(null); clearButton.setBorderPainted(false); clearButton.setContentAreaFilled(false);
private void initializeComponents () { JPanel contentPanel = getContentPanel(); { label = new JLabel("Value:"); contentPanel.add(label, new GridBagConstraints(2, 2, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0)); } { minSlider = new Slider(0, -99999, 99999, 1, -400, 400); contentPanel.add(minSlider, new GridBagConstraints(3, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); } { maxSlider = new Slider(0, -99999, 99999, 1, -400, 400); contentPanel.add(maxSlider, new GridBagConstraints(4, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0)); } { rangeButton = new JButton("<"); rangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); contentPanel.add(rangeButton, new GridBagConstraints(5, 2, 1, 1, 1.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); } } }
JButton button = new JButton(); button.setBorderPainted(false); button.setBorder(null); //button.setFocusable(false); button.setMargin(new Insets(0, 0, 0, 0)); button.setContentAreaFilled(false); button.setIcon(myIcon1); button.setRolloverIcon(myIcon2); button.setPressedIcon(myIcon3); button.setDisabledIcon(myIcon4);
expandButton.setBorder(BorderFactory.createEmptyBorder(4, 10, 4, 10)); contentPanel.add(expandButton, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0));
expandButton.setBorder(BorderFactory.createEmptyBorder(4, 10, 4, 10)); contentPanel.add(expandButton, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 6, 0, 0), 0, 0));
highRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(highRangeButton, new GridBagConstraints(5, 1, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); lowRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(lowRangeButton, new GridBagConstraints(5, 2, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); contentPanel.add(expandButton, new GridBagConstraints(7, 5, 1, 1, 0, 0, GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0)); expandButton.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
highRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(highRangeButton, new GridBagConstraints(5, 1, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); lowRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(lowRangeButton, new GridBagConstraints(5, 2, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); contentPanel.add(expandButton, new GridBagConstraints(7, 5, 1, 1, 0, 0, GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0)); expandButton.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
rangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); contentPanel.add(rangeButton, new GridBagConstraints(5, 2, 1, 1, 1.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0));
rangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); contentPanel.add(rangeButton, new GridBagConstraints(5, 2, 1, 1, 1.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0));
highRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(highRangeButton, new GridBagConstraints(5, 1, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); lowRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(lowRangeButton, new GridBagConstraints(5, 2, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); contentPanel.add(expandButton, new GridBagConstraints(7, 5, 1, 1, 1, 0, GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0)); expandButton.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
highRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(highRangeButton, new GridBagConstraints(5, 1, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); lowRangeButton.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); formPanel.add(lowRangeButton, new GridBagConstraints(5, 2, 1, 1, 0.0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 1, 0, 0), 0, 0)); contentPanel.add(expandButton, new GridBagConstraints(7, 5, 1, 1, 1, 0, GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0)); expandButton.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8));
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);
@Override public void mouseExited(MouseEvent e) { if (this.buttonFlat.isEnabled() && !this.isVisible) { this.buttonFlat.setContentAreaFilled(false); this.buttonFlat.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 8)); } }
@Override public void mouseEntered(MouseEvent e) { if (this.buttonFlat.isEnabled() && !this.isVisible) { this.buttonFlat.setContentAreaFilled(true); this.buttonFlat.setBorder(HelperUi.BORDER_ROUND_BLU); } }