@Override protected JButton createArrowButton() { SubstanceDropDownButton result = new SubstanceDropDownButton( this.comboBox); result.setFont(this.comboBox.getFont()); result.setIcon(getCurrentIcon(result)); return result; }
TransitionAwareUI transitionAwareUI = (TransitionAwareUI) this.getUI(); StateTransitionTracker stateTransitionTracker = transitionAwareUI .getTransitionTracker(); - borderDelta); int width = getWidth(); int height = getHeight(); int offsetX = this.getX(); int offsetY = this.getY(); JComponent parent = (JComponent) this.getParent(); SubstanceColorScheme baseBorderScheme = SubstanceColorSchemeUtilities .getColorScheme(this, ColorSchemeAssociationKind.BORDER,
@Override public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g.create(); int componentFontSize = SubstanceSizeUtils.getComponentFontSize(this); int width = getWidth(); int height = getHeight(); int clipDelta = (int) SubstanceSizeUtils .getBorderStrokeWidth(componentFontSize); if (this.getComponentOrientation().isLeftToRight()) { g2d.clipRect(clipDelta, 0, width - clipDelta, height); } else { g2d.clipRect(0, 0, width - clipDelta, height); } super.paint(g2d); g2d.dispose(); } }
@Override public Dimension getMinimumSize(JComponent c) { if (!this.isMinimumSizeDirty) { return new Dimension(this.cachedMinimumSize); } // Dimension size = null; // // if (!this.comboBox.isEditable() && this.arrowButton != null // && this.arrowButton instanceof SubstanceComboBoxButton) { // SubstanceDropDownButton button = (SubstanceDropDownButton) this.arrowButton; Insets buttonInsets = button.getInsets(); Insets insets = this.comboBox.getInsets(); Dimension size = this.getDisplaySize(); size.width += insets.left + insets.right; size.width += buttonInsets.left + buttonInsets.right; size.width += button.getMinimumSize().getWidth(); size.height += insets.top + insets.bottom; // } else if (this.comboBox.isEditable() && this.arrowButton != null // && this.editor != null) { // size = super.getMinimumSize(c); // } else { // size = super.getMinimumSize(c); // } this.cachedMinimumSize.setSize(size.width, size.height); this.isMinimumSizeDirty = false; return new Dimension(this.cachedMinimumSize); }
@Override protected JButton createPopupButton() { this.substancePopupButton = new SubstanceDropDownButton(this.datePicker); this.substancePopupButton.setFocusPainted(false); configurePopupButton(); this.substancePopupButton.setIcon(SubstanceCoreUtilities.getArrowIcon( this.substancePopupButton, SwingConstants.SOUTH)); return this.substancePopupButton; }
TransitionAwareUI transitionAwareUI = (TransitionAwareUI) this.getUI(); StateTransitionTracker stateTransitionTracker = transitionAwareUI .getTransitionTracker(); - borderDelta); int width = getWidth(); int height = getHeight(); int offsetX = this.getX(); int offsetY = this.getY(); JComponent parent = (JComponent) this.getParent(); SubstanceColorScheme baseBorderScheme = SubstanceColorSchemeUtilities .getColorScheme(this, ColorSchemeAssociationKind.BORDER,
@Override public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g.create(); int componentFontSize = SubstanceSizeUtils.getComponentFontSize(this); int width = getWidth(); int height = getHeight(); int clipDelta = (int) SubstanceSizeUtils .getBorderStrokeWidth(componentFontSize); if (this.getComponentOrientation().isLeftToRight()) { g2d.clipRect(clipDelta, 0, width - clipDelta, height); } else { g2d.clipRect(0, 0, width - clipDelta, height); } super.paint(g2d); g2d.dispose(); } }
@Override public Dimension getMinimumSize(JComponent c) { if (!this.isMinimumSizeDirty) { return new Dimension(this.cachedMinimumSize); } // Dimension size = null; // // if (!this.comboBox.isEditable() && this.arrowButton != null // && this.arrowButton instanceof SubstanceComboBoxButton) { // SubstanceDropDownButton button = (SubstanceDropDownButton) this.arrowButton; Insets buttonInsets = button.getInsets(); Insets insets = this.comboBox.getInsets(); Dimension size = this.getDisplaySize(); size.width += insets.left + insets.right; size.width += buttonInsets.left + buttonInsets.right; size.width += button.getMinimumSize().getWidth(); size.height += insets.top + insets.bottom; // } else if (this.comboBox.isEditable() && this.arrowButton != null // && this.editor != null) { // size = super.getMinimumSize(c); // } else { // size = super.getMinimumSize(c); // } this.cachedMinimumSize.setSize(size.width, size.height); this.isMinimumSizeDirty = false; return new Dimension(this.cachedMinimumSize); }
@Override protected JButton createArrowButton() { SubstanceDropDownButton result = new SubstanceDropDownButton( this.comboBox); result.setFont(this.comboBox.getFont()); result.setIcon(getCurrentIcon(result)); return result; }