Package idare.imagenode.Utilities
Class GUIUtils
- java.lang.Object
-
- idare.imagenode.Utilities.GUIUtils
-
public class GUIUtils extends Object
Class proviing static utilitits for multiple GUI classes.- Author:
- Thomas Pfau
-
-
Constructor Summary
Constructors Constructor Description GUIUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JTextPanecreateSelectionDescription(String DescriptionString, Color background, Font font)Create a JTextPane that is uneditable and uses background and font as desired.static JPanelcreateSelectionPanel(String SelectionName, JComboBox selector, Color background)Create a SelecionPanel, with a given String and a JCombobox as selector along with a given backrgound color.static DimensiongetPreferredSize(JTextComponent comp, Dimension origDimension, int minwidth)Get the preferred size of a JTextComponent given a specific minimal width and its current dimension
-
-
-
Method Detail
-
createSelectionDescription
public static JTextPane createSelectionDescription(String DescriptionString, Color background, Font font)
Create a JTextPane that is uneditable and uses background and font as desired.
-
getPreferredSize
public static Dimension getPreferredSize(JTextComponent comp, Dimension origDimension, int minwidth)
Get the preferred size of a JTextComponent given a specific minimal width and its current dimension- Parameters:
comp- the component to get the preferred size.origDimension- The original Dimension of the component.minwidth- The minimal width to use.- Returns:
- the preferred height for the provided
JTextComponentassuming the given minimum width and the actual width from the dimension.
-
createSelectionPanel
public static JPanel createSelectionPanel(String SelectionName, JComboBox selector, Color background)
Create a SelecionPanel, with a given String and a JCombobox as selector along with a given backrgound color.- Parameters:
SelectionName- - The Name for the panelselector- - theJComboBoxthat represents the selection options.background- The Color to use as background.- Returns:
- a JPanel that contains the Descriptor and selector properly aligned.
-
-