Class SelectorWindow
- Direct Known Subclasses:
DefaultValueSelector
The ancestor class of the selector windows, that are used by the selector item. Every selector window, that is to be used through a selector item, must extend from this class.
The selector item creates the window automatically, with the use of the constructor implemented in the class, it does not need to be overwritten. The rendering (component building,
initializing) must be done through the
rendering()
method. The method will be called by the selector item.
When the window is displayed, the selector item will call t he showSelector()
method, the operations that need to be executed upon display must be implemented here.
These are the
data query operations, setting the window back to the default state, etc.
When the window is closed, the selector item will call the closeSelector()
method.
The class also contains two methods, which can be used during the implementation of the window operation. These are the following: The getParentSelectorItem()
,
which returns the selector item instance,
from which the window was opened from. The selectElement(Object)
method allows the passing of the values selected by the user, as a chosen value, to the selector item.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
The window close eventfinal SelectorItem
Gets the parent selector item instance.abstract void
The window rendering must be implemented here.final void
selectElement
(Object selectedElement) Selects an elementabstract void
The window opening eventMethods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, afterDraw, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getName, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, init, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, isVisible, onHide, onHotKeyEventHandler, onShow, openTag, redraw, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEnabled, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setMargin, setName, setOverflow, setPadding, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setVisible, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass, writeHTML
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
-
Constructor Details
-
SelectorWindow
- Parameters:
parent
- The selector item instance, that will have this selector window assigned to.language
- The language code, that the form item will use.The value is the same as the selector item's language code- Throws:
NullPointerException
- If the selector item isnull
-
-
Method Details
-
rendering
public abstract void rendering()The window rendering must be implemented here. The components must be built here, and they have to be assigned to each other. These will make up the window.
This is called once by the selector item, when the window is being rendered.
-
showSelector
public abstract void showSelector()The window opening event
The selector item calls this method, when the user wants to open the selector window. The window opening, data query and every other related operations must be implemented here.
-
closeSelector
public abstract void closeSelector()The window close event
The selector item calls this method, when the user wants to close the selector window. Relevant operations, such as removing/hiding components must be implemented here.
-
selectElement
Selects an element- Parameters:
selectedElement
- The selected element. Could be a record from the selector item DataDescriptor, selected by the user, or could be a data value for the selector item. If a record is passed, that will be used as a basis when setting the selector item. If a data value is passed, the selector item will try to query it from the database. If it finds a record that is corresponding to the specified object, that will be used as a basis for setting the selector item.
-
getParentSelectorItem
Gets the parent selector item instance.- Returns:
- The parent selector item instance, that is connected to the selector window.
-