Class ComponentCheckbox
java.lang.Object
de.julianweinelt.datacat.dbx.api.ui.Component<Boolean,ComponentCheckbox>
de.julianweinelt.datacat.dbx.api.ui.components.ComponentCheckbox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction(Consumer<ComponentCheckbox> action) checkLabel(String checkLabel) create()Should return the internal Swing object.booleanDefines if the component should be expanded to the window's width size in the component's parent screen.initialValue(Object val) For setting an initial value that should be displayed before any of the user's input.
It should always return the instance of theComponent.value()Should return the value of the Component's Swing Object. e.g., if implementing a text field, it should return the entered value of the text field.Methods inherited from class de.julianweinelt.datacat.dbx.api.ui.Component
createLabel, hasLabel, label
-
Constructor Details
-
ComponentCheckbox
public ComponentCheckbox()
-
-
Method Details
-
checkLabel
-
expandHorizontally
public boolean expandHorizontally()Description copied from class:ComponentDefines if the component should be expanded to the window's width size in the component's parent screen. Example: a horizontal line for splitting content- Specified by:
expandHorizontallyin classComponent<Boolean,ComponentCheckbox> - Returns:
trueif it should be expanded, otherwisefalse
-
initialValue
Description copied from class:ComponentFor setting an initial value that should be displayed before any of the user's input.
It should always return the instance of theComponent. Implementation example:protected JTextField textField; @Override public ComponentTextField initialValue(Object value) { if (value instanceof String) { textField.setText((String) value); } return this; }- Specified by:
initialValuein classComponent<Boolean,ComponentCheckbox> - Parameters:
val- The value to set.- Returns:
- The
Component's instance.
-
value
Description copied from class:ComponentShould return the value of the Component's Swing Object. e.g., if implementing a text field, it should return the entered value of the text field.- Specified by:
valuein classComponent<Boolean,ComponentCheckbox> - Returns:
- The entered value of this component.
-
action
-
create
Description copied from class:ComponentShould return the internal Swing object.- Specified by:
createin classComponent<Boolean,ComponentCheckbox> - Returns:
- An object extending
JComponent
-