Package io.codeworth.panelmatic.util
Class PanelPostProcessors
- java.lang.Object
-
- io.codeworth.panelmatic.util.PanelPostProcessors
-
public class PanelPostProcessors extends Object
Ready-made post processors. Cover common use-cases and server as an example.- Author:
- michael
-
-
Constructor Summary
Constructors Constructor Description PanelPostProcessors()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PanelPostProcessoraddBorder(String title)Adds aTitledBorderto the panel, with the passed title.static PanelPostProcessoraddBorder(Border b)Adds a border to the product panel.static PanelPostProcessorwrapInScrollPane()Wraps the product in a JScrollPane that allows only vertical scrolling, and whose vertical scrollbar is visible only when needed.static PanelPostProcessorwrapInScrollPane(Boolean vScroll)Wraps the product in a JScrollPane that does not allow horizontal scrolling.static PanelPostProcessorwrapInScrollPane(Boolean hScroll, Boolean vScroll)Wraps the panel in aJScrollPane.
-
-
-
Method Detail
-
addBorder
public static PanelPostProcessor addBorder(Border b)
Adds a border to the product panel.- Parameters:
b- the border to be added.- Returns:
- The product.
-
addBorder
public static PanelPostProcessor addBorder(String title)
Adds aTitledBorderto the panel, with the passed title.- Parameters:
title- the passed title.- Returns:
- the product.
-
wrapInScrollPane
public static PanelPostProcessor wrapInScrollPane(Boolean hScroll, Boolean vScroll)
Wraps the panel in aJScrollPane. Passed values are tri-state:Boolean.FALSEmeans "never show scrollbar".nullmeans "use default behavior".Boolean.TRUEmeans "always show scrollbar".
- Parameters:
hScroll- scroll policy for horizontal scrollingvScroll- scroll policy for vertical scrolling- Returns:
- the
JScrollPane.
-
wrapInScrollPane
public static PanelPostProcessor wrapInScrollPane(Boolean vScroll)
Wraps the product in a JScrollPane that does not allow horizontal scrolling.- Parameters:
vScroll- Policy for vertical scrolling- Returns:
- the Wrapping
JScrollPane. - See Also:
wrapInScrollPane(java.lang.Boolean, java.lang.Boolean)
-
wrapInScrollPane
public static PanelPostProcessor wrapInScrollPane()
Wraps the product in a JScrollPane that allows only vertical scrolling, and whose vertical scrollbar is visible only when needed.- Returns:
- the Wrapping
JScrollPane. - See Also:
wrapInScrollPane(java.lang.Boolean, java.lang.Boolean)
-
-