public abstract class OAUIController extends HubListenerAdapter
abstract method of update UI component.
,
abstract method of update label.
Modifier and Type | Class and Description |
---|---|
protected class |
OAUIController.MyHubChangeListener |
HubListener.InsertLocation
Constructor and Description |
---|
OAUIController(Hub hub,
Object object,
String propertyPath,
boolean bAoOnly,
HubChangeListener.Type type)
Create new controller for Hub and Jfc component
|
OAUIController(Hub hub,
String propertyPath) |
Modifier and Type | Method and Description |
---|---|
protected void |
_afterPropertyChange(HubEvent e) |
protected void |
_reset() |
protected void |
_update() |
HubChangeListener.HubProp |
addEnabledCheck(Hub hub,
HubChangeListener.Type type) |
HubChangeListener.HubProp |
addEnabledCheck(Hub hub,
String pp) |
HubChangeListener.HubProp |
addEnabledCheck(Hub hub,
String property,
HubChangeListener.Type type) |
HubChangeListener.HubProp |
addEnabledCheck(Hub hub,
String pp,
Object value) |
HubChangeListener.HubProp |
addEnabledEditQueryCheck(Hub hub,
String propertyName) |
HubChangeListener.HubProp |
addEnabledObjectCallbackCheck(Hub hub,
String propertyName) |
HubChangeListener.HubProp |
addVisibleCheck(Hub hub,
String pp) |
HubChangeListener.HubProp |
addVisibleCheck(Hub hub,
String property,
HubChangeListener.Type type) |
HubChangeListener.HubProp |
addVisibleCheck(Hub hub,
String pp,
Object value) |
HubChangeListener.HubProp |
addVisibleEditQueryCheck(Hub hub,
String propertyName) |
HubChangeListener.HubProp |
addVisibleObjectCallbackCheck(Hub hub,
String propertyName) |
void |
afterAdd(HubEvent e)
Event sent after object is added to Hub, before cache size is checked and before property to master is set.
|
protected void |
afterChangeActiveObject() |
void |
afterChangeActiveObject(HubEvent e)
Event sent after ActiveObject has been set.
|
void |
afterInsert(HubEvent e) |
void |
afterNewList(HubEvent e)
Called after onNewList is called
|
protected void |
afterPropertyChange() |
void |
afterPropertyChange(HubEvent e) |
void |
afterRemove(HubEvent e)
Event sent after an object is removed from a Hub.
|
void |
afterRemoveAll(HubEvent e)
Sent after all objects are removed/cleared from the Hub.
|
void |
beforePropertyChange(HubEvent e)
Event sent whenever a property is changed.
|
void |
bind(Hub hub,
String propertyPath) |
protected void |
callUpdate()
Called to have component update itself.
|
void |
close() |
protected boolean |
confirmPropertyChange(Object obj,
Object newValue)
confirm a new change.
|
void |
enableVisibleListener(boolean b)
Called to add or remove a UI specific listener (ex: inactive/hidden tab) that is used to know if the component is
visible to the user.
|
protected void |
finalize() |
boolean |
getAllowRemovingFromSelectHub() |
String |
getBackgroundColorPropertyPath() |
HubChangeListener |
getChangeListener()
Used to listen to additional changes that will then call this.update()
|
String |
getCompletedMessage() |
String |
getConfirmMessage()
Popup message used to confirm button click before running code.
|
char |
getConversion() |
Object |
getConvertedValue(Object value,
String fmt)
Converts a value to correct type needed for setMethod
|
String |
getDescription() |
String |
getDisplayTemplate() |
String |
getDisplayText(Object obj,
String defaultText)
Used to display values, uses display template if defined.
|
HubChangeListener |
getEnabledChangeListener() |
String |
getEnabledMessage() |
boolean |
getEnableUndo() |
Class |
getEndPropertyClass() |
Class |
getEndPropertyFromClass() |
String |
getEndPropertyName() |
String |
getFontProperty() |
String |
getForegroundColorPropertyPath() |
String |
getFormat()
Returns format to use for displaying value as a String.
|
boolean |
getHtml() |
Hub |
getHub() |
String |
getHubListenerPropertyName() |
String |
getIconColorPropertyPath() |
String |
getImageDirectory()
Root directory path where images are stored.
|
String |
getImagePropertyPath() |
static String |
getMaskPasswordValue() |
int |
getMaxDisplay() |
int |
getMaxImageHeight() |
int |
getMaxImageWidth() |
int |
getMinDisplay() |
Hub |
getMultiSelectHub() |
String |
getNullDescription()
The "word(s)" to use for the empty slot (null value).
|
Object |
getObject() |
String |
getPropertyPath() |
protected Object |
getRealObject(Object fromObject) |
Hub |
getSelectHub()
Returns the Hub that this component will work with.
|
OATemplate |
getTemplateForDisplay() |
OATemplate |
getTemplateForToolTipText() |
String |
getTitle() |
String |
getToolTipText(Object obj,
String ttDefault) |
String |
getToolTipTextPropertyPath() |
String |
getToolTipTextTemplate() |
String |
getUndoDescription()
Description to use for Undo and Redo presentation names.
|
Object |
getValue(Object obj) |
String |
getValueAsString(Object obj) |
String |
getValueAsString(Object obj,
String fmt) |
String |
getValueAsString(Object obj,
String fmt,
int maxLength) |
HubChangeListener |
getVisibleChangeListener() |
String |
getVisibleMessage() |
boolean |
isEnabled() |
protected boolean |
isListeningTo(Hub hub,
Object object,
String prop) |
boolean |
isParentEnabled()
Utility used to "see" if this component or any of its parent containers are disabled.
|
boolean |
isRequired() |
String |
isValid(Object obj,
Object newValue)
Used to verify a property change.
|
boolean |
isVisible() |
boolean |
isVisibleListenerEnabled() |
boolean |
isVisibleOnScreen() |
protected boolean |
onConfirmPropertyChangeShowOptionDialog(String confirmMessage,
String confirmTitle) |
void |
onNewList(HubEvent e)
Event sent when a new list of objects is available for a Hub.
|
protected void |
onVisibleListenerChange()
Used when enabledVisibleListener(true) is set up.
|
protected void |
reset()
Called when changes are made that affects the setup for component.
|
void |
setBackgroundColorPropertyPath(String pp) |
void |
setCompletedMessage(String msg) |
void |
setConfirmMessage(String msg)
Popup message used to confirm button click before running code.
|
void |
setConversion(char conv)
'U'ppercase, 'L'owercase, 'T'itle, 'J'ava identifier 'E'ncrpted password/encrypt 'S'HA password (one way hash)
|
void |
setDescription(String description) |
void |
setDisplayTemplate(String s) |
void |
setEnableUndo(boolean b)
Flag to enable undo, default is true.
|
void |
setFontPropertyPath(String pp) |
void |
setForegroundColorPropertyPath(String pp) |
void |
setFormat(String fmt)
Format used to display this property.
|
void |
setHtml(boolean b) |
void |
setHub(Hub hub) |
void |
setIconColorPropertyPath(String pp) |
void |
setImageClassPath(Class root,
String path)
Class path where images are stored.
|
void |
setImageDirectory(String s)
Root directory path where images are stored.
|
void |
setImagePropertyPath(String pp) |
void |
setMaxDisplay(int x)
max number of characters to display (number of characters).
|
void |
setMaxImageHeight(int maxImageHeight) |
void |
setMaxImageWidth(int maxImageWidth) |
void |
setMaxLength(int x)
max input length for input (number of characters).
|
void |
setMinDisplay(int x)
minimum number of characters to display (number of characters).
|
void |
setMultiSelectHub(Hub newHub) |
void |
setNullDescription(String s) |
void |
setPropertyPath(String propPath) |
void |
setReadOnly(boolean b) |
void |
setSelectHub(Hub newHub) |
void |
setSelectHub(Hub newHub,
boolean bAllowRemovingFromSelectHub)
Sets the MultiSelect that this component will work with.
|
void |
setTitle(String title) |
void |
setToolTipTextPropertyPath(String pp) |
void |
setToolTipTextTemplate(String s) |
void |
setUndoDescription(String s)
Description to use for Undo and Redo presentation names.
|
void |
setValue(Object value) |
void |
setValue(Object obj,
Object value) |
void |
setValue(Object obj,
Object newValue,
String fmt) |
void |
setValueDirectly(Object obj,
Object newValue) |
void |
setViewOnly(boolean b) |
abstract void |
updateComponent(Object object)
Called when a change is necessary for UI component.
|
abstract void |
updateLabel(Object object) |
afterDelete, afterLoad, afterMove, afterSave, afterSort, beforeAdd, beforeDelete, beforeInsert, beforeMove, beforeRefresh, beforeRemove, beforeRemoveAll, beforeSave, beforeSelect, getListener, getLocation, getName, setLocation
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllowAdd, getAllowDelete, getAllowEnabled, getAllowRemove, getAllowRemoveAll, getAllowVisible, isValidAdd, isValidDelete, isValidPropertyChange, isValidRemove, isValidRemoveAll
public boolean DEBUG
public static boolean DEBUGUI
protected Hub hub
protected final boolean bAoOnly
protected String propertyPath
protected OAPropertyPath oaPropertyPath
protected Class endPropertyFromClass
protected String endPropertyName
protected Class endPropertyClass
protected String hubListenerPropertyName
protected Object hubObject
protected Hub hubTemp
protected final boolean bUseObjectCallback
protected HubChangeListener.Type hubChangeListenerType
protected boolean bIsHubCalc
protected boolean bListenToHubSize
protected boolean bEnableUndo
protected String undoDescription
protected Hub hubSelect
protected String format
protected String fontPropertyPath
protected String backgroundColorPropertyPath
protected String foregroundColorPropertyPath
protected String iconColorPropertyPath
protected int maxImageHeight
protected int maxImageWidth
protected String imageDirectory
protected String imageClassPath
protected Class rootImageClassPath
protected String imagePropertyPath
protected String toolTipTextPropertyPath
protected String nullDescription
protected boolean bHtml
protected OAUIController.MyHubChangeListener changeListener
protected OAUIController.MyHubChangeListener changeListenerEnabled
protected OAUIController.MyHubChangeListener changeListenerVisible
protected String displayTemplate
protected OATemplate templateDisplay
protected String toolTipTextTemplate
protected OATemplate templateToolTipText
protected boolean bRequired
protected char conversion
protected volatile boolean bIgnoreUpdate
public OAUIController(Hub hub, Object object, String propertyPath, boolean bAoOnly, HubChangeListener.Type type)
hub
- object
- if hub is null, then this object will be put in temp hub and made the AOpropertyPath
- property used by componentbAoOnly
- should controller listen to propChange for all objects in hub, or just AO.type
- default type of change listenerprotected void reset()
protected void _reset()
public Hub getHub()
public void setHub(Hub hub)
public Object getObject()
public String getPropertyPath()
public void setPropertyPath(String propPath)
public String getEndPropertyName()
public Class getEndPropertyClass()
public Class getEndPropertyFromClass()
public String getHubListenerPropertyName()
protected void finalize() throws Throwable
public void close()
public void enableVisibleListener(boolean b)
public Hub getSelectHub()
public Hub getMultiSelectHub()
public boolean getAllowRemovingFromSelectHub()
public void setSelectHub(Hub newHub, boolean bAllowRemovingFromSelectHub)
public void setSelectHub(Hub newHub)
public void setMultiSelectHub(Hub newHub)
public void setValue(Object value)
public void setEnableUndo(boolean b)
public boolean getEnableUndo()
public void setConfirmMessage(String msg)
public String getConfirmMessage()
public void beforePropertyChange(HubEvent e)
HubListener
Note: propertyChanges are sent for any changed object, not just the ActiveObject
beforePropertyChange
in interface HubListener
beforePropertyChange
in class HubListenerAdapter
protected boolean confirmPropertyChange(Object obj, Object newValue)
protected boolean onConfirmPropertyChangeShowOptionDialog(String confirmMessage, String confirmTitle)
public Object getConvertedValue(Object value, String fmt)
public void setViewOnly(boolean b)
public void setReadOnly(boolean b)
public String isValid(Object obj, Object newValue)
public String getFormat()
see OAConverterNumber#OAConverterNumber
public void setFormat(String fmt)
see OAConverterNumber#OAConverterNumber
public boolean isParentEnabled()
public void setFontPropertyPath(String pp)
public String getFontProperty()
public void setForegroundColorPropertyPath(String pp)
public String getForegroundColorPropertyPath()
public void setBackgroundColorPropertyPath(String pp)
public String getBackgroundColorPropertyPath()
public void setIconColorPropertyPath(String pp)
public String getIconColorPropertyPath()
public void setToolTipTextPropertyPath(String pp)
public String getToolTipTextPropertyPath()
public void setImageDirectory(String s)
public String getImageDirectory()
public void setImageClassPath(Class root, String path)
public void setImagePropertyPath(String pp)
public String getImagePropertyPath()
public String getNullDescription()
public void setNullDescription(String s)
public HubChangeListener getChangeListener()
public HubChangeListener getEnabledChangeListener()
public HubChangeListener getVisibleChangeListener()
public HubChangeListener.HubProp addEnabledCheck(Hub hub, String pp)
public HubChangeListener.HubProp addEnabledCheck(Hub hub, String pp, Object value)
public HubChangeListener.HubProp addEnabledCheck(Hub hub, String property, HubChangeListener.Type type)
public HubChangeListener.HubProp addEnabledCheck(Hub hub, HubChangeListener.Type type)
public HubChangeListener.HubProp addEnabledEditQueryCheck(Hub hub, String propertyName)
public HubChangeListener.HubProp addEnabledObjectCallbackCheck(Hub hub, String propertyName)
public HubChangeListener.HubProp addVisibleCheck(Hub hub, String pp)
public HubChangeListener.HubProp addVisibleCheck(Hub hub, String pp, Object value)
public HubChangeListener.HubProp addVisibleCheck(Hub hub, String property, HubChangeListener.Type type)
public HubChangeListener.HubProp addVisibleEditQueryCheck(Hub hub, String propertyName)
public HubChangeListener.HubProp addVisibleObjectCallbackCheck(Hub hub, String propertyName)
protected void callUpdate()
protected void _update()
public boolean isVisible()
public boolean isEnabled()
public String getEnabledMessage()
public String getVisibleMessage()
public void setMinDisplay(int x)
public int getMinDisplay()
public void setMaxDisplay(int x)
public int getMaxDisplay()
public void setMaxLength(int x)
public int getMaxImageHeight()
public void setMaxImageHeight(int maxImageHeight)
public int getMaxImageWidth()
public void setMaxImageWidth(int maxImageWidth)
public void setHtml(boolean b)
public boolean getHtml()
public void setUndoDescription(String s)
public String getUndoDescription()
public void afterAdd(HubEvent e)
HubListener
afterAdd
in interface HubListener
afterAdd
in class HubListenerAdapter
Hub.add
public void afterRemove(HubEvent e)
HubListener
afterRemove
in interface HubListener
afterRemove
in class HubListenerAdapter
public void afterRemoveAll(HubEvent e)
HubListener
afterRemoveAll
in interface HubListener
afterRemoveAll
in class HubListenerAdapter
public void onNewList(HubEvent e)
HubListener
onNewList
in interface HubListener
onNewList
in class HubListenerAdapter
public void afterInsert(HubEvent e)
afterInsert
in interface HubListener
afterInsert
in class HubListenerAdapter
public void afterChangeActiveObject(HubEvent e)
HubListener
afterChangeActiveObject
in interface HubListener
afterChangeActiveObject
in class HubListenerAdapter
public void afterNewList(HubEvent e)
HubListener
afterNewList
in interface HubListener
afterNewList
in class HubListenerAdapter
public void afterPropertyChange(HubEvent e)
afterPropertyChange
in interface HubListener
afterPropertyChange
in class HubListenerAdapter
protected void _afterPropertyChange(HubEvent e)
protected void afterPropertyChange()
protected void afterChangeActiveObject()
public void setDisplayTemplate(String s)
public String getDisplayTemplate()
public OATemplate getTemplateForDisplay()
public String getDisplayText(Object obj, String defaultText)
public void setToolTipTextTemplate(String s)
public String getToolTipTextTemplate()
public OATemplate getTemplateForToolTipText()
protected void onVisibleListenerChange()
public boolean isRequired()
public static String getMaskPasswordValue()
public void setConversion(char conv)
public char getConversion()
public boolean isVisibleListenerEnabled()
public boolean isVisibleOnScreen()
public void setTitle(String title)
public String getTitle()
public void setDescription(String description)
public String getDescription()
getDescription
in class HubListenerAdapter
public void setCompletedMessage(String msg)
public String getCompletedMessage()
public abstract void updateComponent(Object object)
public abstract void updateLabel(Object object)
Copyright © 1999–2025 ViaOA. All rights reserved.