Package org.dwcj.controls
Class AbstractDwcControl
java.lang.Object
org.dwcj.controls.AbstractControl
org.dwcj.controls.AbstractDwcControl
- All Implemented Interfaces:
Control,Enableable,HasAttribute,HasClassName,HasComputedStyle,HasControlText,HasDestroy,HasStyle,HasTooltip,HasVisibility
- Direct Known Subclasses:
AbstractDwcjPanel,AbstractDwclistControl,Button,CheckBox,ColorPicker,DateEditBox,FileChooser,FontChooser,GridExWidget,HtmlContainer,HtmlEdit,ImageControl,Label,MenuButton,MenuItem,Navigator,NumericBox,OpenFileDialog,PopupMenu,PrintPreview,ProgressBar,RadioButton,ScrollBar,Slider,StringEditBox,TabControl,TextArea,TextBox,TreeView
public abstract class AbstractDwcControl
extends AbstractControl
implements HasAttribute, HasControlText, HasComputedStyle, HasClassName, HasStyle, Enableable, HasTooltip, HasVisibility
The base class for most DWC/BBj controls. Extends the AbstractControl class, and implements
default behaviors for the implemented interface methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.basis.util.common.BasisNumberprotected static final com.basis.util.common.BasisNumberprotected static final com.basis.util.common.BasisNumberprotected Booleanprotected Integerprotected Booleanstatic final Stringstatic final Stringprotected Booleanprotected TextAlignable.Alignmentprotected TextHighlightable.Highlightprotected IntegerFields inherited from class org.dwcj.controls.AbstractControl
ctrl, destroyed, elementId, userData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddClassName(String selector) Adds a CSS class to the list of CSS classes for the control.protected voidcatchUp()The catchUp method is used to replay attributes and settings that the API user might have added to a control before its creation.voiddestroy()Destroy the control and remove it from the panelgetAttribute(String attribute) retrieve the value of the given attributegetComputedStyle(String property) Returns a String containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.getText()get the text property of the controlget the tooltip text property of the controlremoveClassName(String selector) Removes a CSS class from the list of CSS classes for the control.setAttribute(String attribute, String value) set the value for an attribute in the controlprotected voidsetControlExpanse(Enum<?> expanse) protected voidsetControlTheme(Enum<?> theme) setEnabled(Boolean enabled) Set whether the control is to be enabledAssigns specified value to the specified CSS propertyset the text of the control Each control implementing this interface has a text property, which might be visible in different ways (caption, title, contents of edit) or sometimes not visible at allsetTooltipText(String text) Set the tooltip text of the controlsetVisible(Boolean visible) Set whether the control is visible or invisibleMethods inherited from class org.dwcj.controls.AbstractControl
create, getCaughtUp, getId, getUserData, isDestroyed, setId, setUserData
-
Field Details
-
STR_EXPANSE
- See Also:
-
STR_THEME
- See Also:
-
BASISNUMBER_1
protected static final com.basis.util.common.BasisNumber BASISNUMBER_1 -
BASISNUMBER_25
protected static final com.basis.util.common.BasisNumber BASISNUMBER_25 -
BASISNUMBER_250
protected static final com.basis.util.common.BasisNumber BASISNUMBER_250 -
readOnly
-
focusable
-
tabTraversable
-
textAlignment
-
horizontalScrollBarPosition
-
verticalScrollBarPosition
-
mouseWheelCondition
-
textHighlight
-
-
Constructor Details
-
AbstractDwcControl
public AbstractDwcControl()
-
-
Method Details
-
getAttribute
Description copied from interface:HasAttributeretrieve the value of the given attribute- Specified by:
getAttributein interfaceHasAttribute- Parameters:
attribute- the key/name of the attribute- Returns:
- the value
-
setAttribute
set the value for an attribute in the control- Specified by:
setAttributein interfaceHasAttribute- Parameters:
attribute- the name of the attributevalue- the value to be set- Returns:
- the control itself
-
getText
Description copied from interface:HasControlTextget the text property of the control- Specified by:
getTextin interfaceHasControlText- Returns:
- the text
-
setText
Description copied from interface:HasControlTextset the text of the control Each control implementing this interface has a text property, which might be visible in different ways (caption, title, contents of edit) or sometimes not visible at all- Specified by:
setTextin interfaceHasControlText- Returns:
- the control itself
-
getComputedStyle
Description copied from interface:HasComputedStyleReturns a String containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.- Specified by:
getComputedStylein interfaceHasComputedStyle- Returns:
- String containing all computed styles
-
addClassName
Description copied from interface:HasClassNameAdds a CSS class to the list of CSS classes for the control.- Specified by:
addClassNamein interfaceHasClassName- Returns:
- The control itself
-
removeClassName
Description copied from interface:HasClassNameRemoves a CSS class from the list of CSS classes for the control.- Specified by:
removeClassNamein interfaceHasClassName- Returns:
- The control itself
-
setStyle
Description copied from interface:HasStyleAssigns specified value to the specified CSS property -
isEnabled
- Specified by:
isEnabledin interfaceEnableable- Returns:
- if control is enabled (=true) or disabled (=false)
-
setEnabled
Description copied from interface:EnableableSet whether the control is to be enabled- Specified by:
setEnabledin interfaceEnableable- Returns:
- the control itself
-
getTooltipText
Description copied from interface:HasTooltipget the tooltip text property of the control- Specified by:
getTooltipTextin interfaceHasTooltip- Returns:
- the tooltip text
-
setTooltipText
Description copied from interface:HasTooltipSet the tooltip text of the control- Specified by:
setTooltipTextin interfaceHasTooltip- Returns:
- the control itself
-
isVisible
- Specified by:
isVisiblein interfaceHasVisibility- Returns:
- if control is visible (=true) or invisible (=false)
-
setVisible
Description copied from interface:HasVisibilitySet whether the control is visible or invisible- Specified by:
setVisiblein interfaceHasVisibility- Returns:
- the control itself
-
setControlTheme
-
setControlExpanse
-
catchUp
The catchUp method is used to replay attributes and settings that the API user might have added to a control before its creation. A control is not created before it's added to a panel. Anything that is added between instantiation of a control and its addition to a panel has to be recorded and replayed in this method- Overrides:
catchUpin classAbstractControl- Throws:
IllegalAccessException- - thrown if an attempt is made to call this method more than once
-
destroy
public void destroy()Description copied from interface:HasDestroyDestroy the control and remove it from the panel- Specified by:
destroyin interfaceHasDestroy- Overrides:
destroyin classAbstractControl
-