Package com.formdev.flatlaf.ui
Class FlatOptionPaneUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.OptionPaneUI
-
- javax.swing.plaf.basic.BasicOptionPaneUI
-
- com.formdev.flatlaf.ui.FlatOptionPaneUI
-
public class FlatOptionPaneUI extends BasicOptionPaneUI
Provides the Flat LaF UI delegate forJOptionPane
.- UiDefault:
- OptionPane.font Font unused, OptionPane.background Color, OptionPane.foreground Color unused, OptionPane.border Border, OptionPane.messageAreaBorder Border, OptionPane.buttonAreaBorder Border, OptionPane.messageForeground Color optional; defaults to Label.foreground, OptionPane.messageFont Font optional; defaults to Label.font, OptionPane.buttonFont Font optional; defaults to Button.font, OptionPane.minimumSize Dimension, OptionPane.buttonPadding int, OptionPane.buttonMinimumWidth int -1=disabled, OptionPane.sameSizeButtons boolean if true, gives all buttons same size, OptionPane.setButtonMargin boolean if true, invokes button.setMargin(2,4,2,4), OptionPane.buttonOrientation int 0=center, 2=left, 4=right, OptionPane.isYesLast boolean reverse button order if true, OptionPane.errorIcon Icon, OptionPane.informationIcon Icon, OptionPane.questionIcon Icon, OptionPane.warningIcon Icon, OptionPane.okButtonText String, OptionPane.okButtonMnemonic String, OptionPane.okIcon Icon, OptionPane.cancelButtonText String, OptionPane.cancelButtonMnemonic String, OptionPane.cancelIcon Icon, OptionPane.yesButtonText String, OptionPane.yesButtonMnemonic String, OptionPane.yesIcon Icon, OptionPane.noButtonText String, OptionPane.noButtonMnemonic String, OptionPane.noIcon Icon , OptionPane.showIcon boolean, OptionPane.iconMessageGap int, OptionPane.messagePadding int, OptionPane.maxCharactersPerLine int
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicOptionPaneUI
BasicOptionPaneUI.ButtonActionListener, BasicOptionPaneUI.ButtonAreaLayout, BasicOptionPaneUI.PropertyChangeHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected int
iconMessageGap
protected int
maxCharactersPerLine
protected int
messagePadding
protected boolean
showIcon
-
Fields inherited from class javax.swing.plaf.basic.BasicOptionPaneUI
hasCustomComponents, initialFocusComponent, inputComponent, MinimumHeight, minimumSize, MinimumWidth, optionPane, propertyChangeListener
-
-
Constructor Summary
Constructors Constructor Description FlatOptionPaneUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated)
protected Container
createButtonArea()
protected Container
createMessageArea()
protected PropertyChangeListener
createPropertyChangeListener()
static ComponentUI
createUI(JComponent c)
protected int
getMaxCharactersPerLineCount()
Dimension
getMinimumOptionPaneSize()
protected boolean
getSizeButtonsToSameWidth()
protected void
installComponents()
protected void
installDefaults()
-
Methods inherited from class javax.swing.plaf.basic.BasicOptionPaneUI
addButtonComponents, addIcon, burstStringInto, containsCustomComponents, createButtonActionListener, createLayoutManager, createSeparator, getButtons, getIcon, getIconForType, getInitialValueIndex, getMessage, getPreferredSize, installKeyboardActions, installListeners, installUI, resetInputValue, selectInitialValue, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, paint, update
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicOptionPaneUI
-
installComponents
protected void installComponents()
- Overrides:
installComponents
in classBasicOptionPaneUI
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
- Overrides:
createPropertyChangeListener
in classBasicOptionPaneUI
-
getMinimumOptionPaneSize
public Dimension getMinimumOptionPaneSize()
- Overrides:
getMinimumOptionPaneSize
in classBasicOptionPaneUI
-
getMaxCharactersPerLineCount
protected int getMaxCharactersPerLineCount()
- Overrides:
getMaxCharactersPerLineCount
in classBasicOptionPaneUI
-
createMessageArea
protected Container createMessageArea()
- Overrides:
createMessageArea
in classBasicOptionPaneUI
-
createButtonArea
protected Container createButtonArea()
- Overrides:
createButtonArea
in classBasicOptionPaneUI
-
addMessageComponents
protected void addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated)
- Overrides:
addMessageComponents
in classBasicOptionPaneUI
-
getSizeButtonsToSameWidth
protected boolean getSizeButtonsToSameWidth()
- Overrides:
getSizeButtonsToSameWidth
in classBasicOptionPaneUI
-
-