Class FlatOptionPaneUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.OptionPaneUI
javax.swing.plaf.basic.BasicOptionPaneUI
com.formdev.flatlaf.ui.FlatOptionPaneUI
Provides the Flat LaF UI delegate for
JOptionPane.
- 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 BasicOptionPaneUI
BasicOptionPaneUI.ButtonActionListener, BasicOptionPaneUI.ButtonAreaLayout, BasicOptionPaneUI.PropertyChangeHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected booleanFields inherited from class BasicOptionPaneUI
hasCustomComponents, initialFocusComponent, inputComponent, MinimumHeight, minimumSize, MinimumWidth, optionPane, propertyChangeListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated) protected Containerprotected Containerprotected PropertyChangeListenerstatic ComponentUIprotected intprotected booleanprotected voidMethods inherited from class BasicOptionPaneUI
addButtonComponents, addIcon, burstStringInto, containsCustomComponents, createButtonActionListener, createLayoutManager, createSeparator, getButtons, getIcon, getIconForType, getInitialValueIndex, getMessage, getPreferredSize, installComponents, installKeyboardActions, installListeners, installUI, resetInputValue, selectInitialValue, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, paint, update
-
Field Details
-
showIcon
protected boolean showIcon- Since:
- 2
-
iconMessageGap
protected int iconMessageGap -
messagePadding
protected int messagePadding -
maxCharactersPerLine
protected int maxCharactersPerLine
-
-
Constructor Details
-
FlatOptionPaneUI
public FlatOptionPaneUI()
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicOptionPaneUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListenerin classBasicOptionPaneUI
-
getMinimumOptionPaneSize
- Overrides:
getMinimumOptionPaneSizein classBasicOptionPaneUI
-
getMaxCharactersPerLineCount
protected int getMaxCharactersPerLineCount()- Overrides:
getMaxCharactersPerLineCountin classBasicOptionPaneUI
-
createMessageArea
- Overrides:
createMessageAreain classBasicOptionPaneUI
-
createButtonArea
- Overrides:
createButtonAreain classBasicOptionPaneUI
-
addMessageComponents
protected void addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated) - Overrides:
addMessageComponentsin classBasicOptionPaneUI
-
getSizeButtonsToSameWidth
protected boolean getSizeButtonsToSameWidth()- Overrides:
getSizeButtonsToSameWidthin classBasicOptionPaneUI
-