Package io.codeworth.panelmatic
Interface PanelBuilderComponentFactory
-
- All Known Implementing Classes:
DefaultComponentFactory
public interface PanelBuilderComponentFactoryCreates components for the panel builder. Implement/Subclass if you want to customize the automatically created components, e.g. titles, labels.- Author:
- michaelbar-sinai
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JComponentgetComponentLabel(Icon icon, String text, JComponent component)Creates label that displays a label for a component.ComponentOrientationgetComponentOrientation()JComponentgetContainer()Create the container into which all the other components will go.JComponentgetHeader(PanelBuilder.HeaderLevel hx, Icon icon, String text, JComponent... headerWidgets)Creates a new heading.voidsetComponentOrientation(ComponentOrientation aComponentOrientation)Sets the orientation of the to-be-created components.
-
-
-
Method Detail
-
getComponentLabel
JComponent getComponentLabel(Icon icon, String text, JComponent component)
Creates label that displays a label for a component. E.g, if there's a "given name" text field, the returned component would be displayed next to it, saying "Given name".- Parameters:
text- The text the label should have.icon- the icon the label should have.component- the component this label is for.- Returns:
- a label with the passed text.
-
getHeader
JComponent getHeader(PanelBuilder.HeaderLevel hx, Icon icon, String text, JComponent... headerWidgets)
Creates a new heading.- Parameters:
hx- How prominent this heading is.icon- The icon this heading should have.text- The text this heading should have.headerWidgets- Widgets that appear on the header. e.g. controls that apply to the entire section below the header.- Returns:
- A heading component
- See Also:
PanelBuilder.HeaderLevel
-
getContainer
JComponent getContainer()
Create the container into which all the other components will go.- Returns:
- the container into which all the other components will go.
-
setComponentOrientation
void setComponentOrientation(ComponentOrientation aComponentOrientation)
Sets the orientation of the to-be-created components.- Parameters:
aComponentOrientation- The orientation of the components-to-be.
-
getComponentOrientation
ComponentOrientation getComponentOrientation()
-
-