M
- type of FIBWidget
this view representsC
- type of technology-specific component this view manageT
- type of data beeing represented by this viewpublic abstract class FIBWidgetViewImpl<M extends FIBWidget,C,T> extends FIBViewImpl<M,C>
Modifier and Type | Class and Description |
---|---|
protected class |
FIBWidgetViewImpl.DynamicEventListener |
protected class |
FIBWidgetViewImpl.DynamicFormatter |
protected class |
FIBWidgetViewImpl.DynamicValueBindingContext |
class |
FIBWidgetViewImpl.FIBDynamicBindingEvaluationContext |
Modifier and Type | Field and Description |
---|---|
protected boolean |
_hasFocus |
static Font |
DEFAULT_LABEL_FONT |
static Font |
DEFAULT_MEDIUM_FONT |
static String |
ENABLED |
protected <any> |
GENotifier |
static int |
META_MASK |
static Dimension |
MINIMUM_SIZE |
protected C |
technologyComponent |
protected boolean |
widgetDisableUserEvent |
protected boolean |
widgetExecuting |
BOTTOM_COMPENSATING_BORDER, LEFT_COMPENSATING_BORDER, RIGHT_COMPENSATING_BORDER, TOP_COMPENSATING_BORDER
Modifier | Constructor and Description |
---|---|
protected |
FIBWidgetViewImpl(M model,
FIBController aController,
<any> RenderingAdapter) |
Modifier and Type | Method and Description |
---|---|
void |
allowListening() |
void |
applyDoubleClickAction(FIBMouseEvent event)
Called after the platform-specific controller has detected a mouse event matching a double-click action
|
void |
applyRightClickAction(FIBMouseEvent event)
Called after the platform-specific controller has detected a mouse event matching a right-click action
|
void |
applySingleClickAction(FIBMouseEvent event)
Called after the platform-specific controller has detected a mouse event matching a single-click action
|
protected void |
componentBecomesInvisible()
Called when the component view explicitely change its visibility state from VISIBLE to INVISIBLE
|
protected void |
componentBecomesVisible()
Called when the component view explicitely change its visibility state from INVISIBLE to VISIBLE
|
protected void |
componentGainsFocus()
Called when the component view explicitely changes its focus state from UNFOCUSED to FOCUSED
|
protected void |
componentLoosesFocus()
Called when the component view explicitely changes its focus state from FOCUSED to UNFOCUSED
|
void |
delete() |
void |
executeEvent(EventDescription e) |
void |
focusGained(FocusEvent event) |
void |
focusLost(FocusEvent event) |
protected void |
gainFocus() |
T |
getDefaultData() |
Icon |
getIconRepresentation(Object value) |
<any> |
getNotifier() |
T |
getRepresentedValue() |
String |
getStringRepresentation(Object value) |
C |
getTechnologyComponent()
Return technology-specific component representing widget
Note that, depending on the underlying technology, this technology-specific component might be embedded in an other component before to be added in component hierarchy (for example if component need to be embedded in a scroll pane) |
Object |
getTechnologyComponentForFIBComponent(FIBComponent component)
Return technology component for supplied
FIBComponent Return technology component if supplied FIBComponent is the represented widget itself, otherwise return null |
T |
getValue()
Return the value represented by the widget
Note that if value binding has been set for related FIBWidget, return the value computed from the value binding If no value was declared, return the value represented by this FIBWidgetView |
M |
getWidget() |
boolean |
hasValue()
Return boolean indicating if represented widget defines a value binding (a connection to some data)
|
protected static int |
indexOfFirstCharExceeding(String s,
int width,
FontMetrics fm) |
void |
invokeLater(Runnable r,
long aggregationTimeOut)
Semantics of this method is not trivial: the goal is to aggregate some notifications within a given time (supplied as a
aggregationTimeOut), to do it only once.
Within this delay, all requests to this method will simply reinitialize time-out, and will be ignored. |
boolean |
isComponentEnabled() |
boolean |
isEnabled() |
boolean |
isFocused() |
boolean |
isListeningLocked() |
boolean |
isReadOnly() |
boolean |
isWidgetEnabled() |
void |
lockListening() |
protected void |
looseFocus() |
protected abstract C |
makeTechnologyComponent()
Create technology-specific component representing FIBWidget
|
protected void |
performUpdate()
Internally called to update the view, once the visibility has been handled by
FIBViewImpl.update() method |
protected void |
performValueChangedAction() |
void |
propertyChange(PropertyChangeEvent evt) |
void |
setEnabled(boolean enabled) |
void |
setValue(T aValue)
Programmatically sets the value represented by the widget
|
protected static List<String> |
trimString(String s,
int width,
FontMetrics fm) |
protected void |
updateComponentsExplicitelyDeclaredAsDependant() |
T |
updateData()
This method is called whenever a notification has been raised, changing the value expressed by data binding (the value beeing
represented by this widget)
This method first compute the value, set the dynamic value stored in this widget with this new value, and then update the widget with the new computed value. This method should be overriden in sub-classes |
void |
updateEnability()
Called when a widget becomes visible
There is no guarantee that widget is in sync with the model, so, we need to call updateWidgetFromModel again |
void |
updateFont() |
void |
updateLanguage() |
equals, fireVariableChanged, getBindingEvaluationContext, getComponent, getController, getDataObject, getDeletedProperty, getEmbeddingComponent, getFont, getLocalized, getParentView, getPropertyChangeSupport, getRenderingAdapter, getRuntimeContext, getValue, getVariableValue, hideView, isComponentVisible, isDeleted, isUpdating, isViewVisible, languageChanged, notEquals, requestFocus, requestFocusInParent, requestFocusInWindow, sameCollections, setEmbeddingComponent, setParentView, setRuntimeContext, setValue, setVariableValue, setVisible, showView, update, updateBackgroundColor, updateForegroundColor, updateMaximumSize, updateMinimumSize, updateOpacity, updatePreferredSize, updateVisibility
public static final int META_MASK
public static final String ENABLED
public static final Font DEFAULT_LABEL_FONT
public static final Font DEFAULT_MEDIUM_FONT
protected C technologyComponent
public static final Dimension MINIMUM_SIZE
protected boolean widgetExecuting
protected boolean widgetDisableUserEvent
protected <any> GENotifier
protected boolean _hasFocus
protected FIBWidgetViewImpl(M model, FIBController aController, <any> RenderingAdapter)
protected void componentBecomesVisible()
FIBViewImpl
componentBecomesVisible
in class FIBViewImpl<M extends FIBWidget,C>
protected void componentBecomesInvisible()
FIBViewImpl
componentBecomesInvisible
in class FIBViewImpl<M extends FIBWidget,C>
protected abstract C makeTechnologyComponent()
public final C getTechnologyComponent()
getTechnologyComponent
in class FIBViewImpl<M extends FIBWidget,C>
public Object getTechnologyComponentForFIBComponent(FIBComponent component)
FIBComponent
FIBComponent
is the represented widget itself, otherwise return nullcomponent
- public <any> getNotifier()
public void lockListening()
public void allowListening()
public boolean isListeningLocked()
public void executeEvent(EventDescription e)
public void delete()
delete
in class FIBViewImpl<M extends FIBWidget,C>
public M getWidget()
public T updateData()
public final void focusGained(FocusEvent event)
public final void focusLost(FocusEvent event)
protected final void gainFocus()
protected final void looseFocus()
protected void componentGainsFocus()
protected void componentLoosesFocus()
public boolean isFocused()
public T getRepresentedValue()
public final boolean hasValue()
public T getValue()
public void setValue(T aValue)
value
- protected void performValueChangedAction()
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in class FIBViewImpl<M extends FIBWidget,C>
protected void performUpdate()
FIBViewImpl.update()
methodperformUpdate
in class FIBViewImpl<M extends FIBWidget,C>
protected void updateComponentsExplicitelyDeclaredAsDependant()
public void updateLanguage()
updateLanguage
in class FIBViewImpl<M extends FIBWidget,C>
public boolean isReadOnly()
public final boolean isWidgetEnabled()
public final boolean isComponentEnabled()
public void applySingleClickAction(FIBMouseEvent event)
event
- platform-specific event which is translated into a generic FIBMouseEventpublic void applyDoubleClickAction(FIBMouseEvent event)
event
- platform-specific event which is translated into a generic FIBMouseEventpublic void applyRightClickAction(FIBMouseEvent event)
event
- platform-specific event which is translated into a generic FIBMouseEventpublic T getDefaultData()
getDefaultData
in class FIBViewImpl<M extends FIBWidget,C>
public void updateFont()
updateFont
in class FIBViewImpl<M extends FIBWidget,C>
public boolean isEnabled()
public void setEnabled(boolean enabled)
public final void updateEnability()
public void invokeLater(Runnable r, long aggregationTimeOut)
r
- runnable to run after last request + timeoutaggregationTimeOut
- in millisecondsprotected static List<String> trimString(String s, int width, FontMetrics fm)
protected static int indexOfFirstCharExceeding(String s, int width, FontMetrics fm)
Copyright © 2022 Openflexo. All rights reserved.