Class FreeColOptionPaneUI


  • public class FreeColOptionPaneUI
    extends javax.swing.plaf.basic.BasicOptionPaneUI
    Draw the "image.background.FreeColOptionPane" resource as a tiled background image.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicOptionPaneUI

        javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener, javax.swing.plaf.basic.BasicOptionPaneUI.ButtonAreaLayout, javax.swing.plaf.basic.BasicOptionPaneUI.PropertyChangeHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int cancelIndex  
      private java.util.List<javax.swing.JButton> newButtons  
      private int okIndex  
      • Fields inherited from class javax.swing.plaf.basic.BasicOptionPaneUI

        hasCustomComponents, initialFocusComponent, inputComponent, MinimumHeight, minimumSize, MinimumWidth, optionPane, propertyChangeListener
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FreeColOptionPaneUI()
      Trivial internal constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addButtonComponents​(java.awt.Container container, java.lang.Object[] buttons, int initialIndex)
      protected java.awt.Container createButtonArea()
      static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)
      private javax.swing.JButton getButton​(int index)
      Get a button by index.
      private int getColumns​(int nButtons)
      Choose the number of columns for the OptionPane buttons.
      void paint​(java.awt.Graphics g, javax.swing.JComponent c)
      private java.util.List<javax.swing.JButton> prepareButtons()
      Prepare the new buttons for this component and cache.
      void selectInitialValue​(javax.swing.JOptionPane op)
      • Methods inherited from class javax.swing.plaf.basic.BasicOptionPaneUI

        addIcon, addMessageComponents, burstStringInto, containsCustomComponents, createButtonActionListener, createLayoutManager, createMessageArea, createPropertyChangeListener, createSeparator, getButtons, getIcon, getIconForType, getInitialValueIndex, getMaxCharactersPerLineCount, getMessage, getMinimumOptionPaneSize, getPreferredSize, getSizeButtonsToSameWidth, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, resetInputValue, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, update
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • okIndex

        private int okIndex
      • cancelIndex

        private int cancelIndex
      • newButtons

        private java.util.List<javax.swing.JButton> newButtons
    • Constructor Detail

      • FreeColOptionPaneUI

        private FreeColOptionPaneUI()
        Trivial internal constructor.
    • Method Detail

      • getColumns

        private int getColumns​(int nButtons)
        Choose the number of columns for the OptionPane buttons.
        Parameters:
        nButtons - The number of buttons.
        Returns:
        A suitable number of columns.
      • prepareButtons

        private java.util.List<javax.swing.JButton> prepareButtons()
        Prepare the new buttons for this component and cache.
        Returns:
        A list of buttons.
      • getButton

        private javax.swing.JButton getButton​(int index)
        Get a button by index.
        Parameters:
        index - The index to look for.
        Returns:
        The corresponding button.
      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)
      • createButtonArea

        protected java.awt.Container createButtonArea()
        Overrides:
        createButtonArea in class javax.swing.plaf.basic.BasicOptionPaneUI
      • addButtonComponents

        protected void addButtonComponents​(java.awt.Container container,
                                           java.lang.Object[] buttons,
                                           int initialIndex)
        Overrides:
        addButtonComponents in class javax.swing.plaf.basic.BasicOptionPaneUI
      • selectInitialValue

        public void selectInitialValue​(javax.swing.JOptionPane op)
        Overrides:
        selectInitialValue in class javax.swing.plaf.basic.BasicOptionPaneUI
      • paint

        public void paint​(java.awt.Graphics g,
                          javax.swing.JComponent c)
        Overrides:
        paint in class javax.swing.plaf.ComponentUI