|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.control.AbstractControllable<C>
C
- instance of IComponentpublic abstract class AbstractControllable<C extends IComponent>
Base class for all genui IControl
implementations.
It handles the notification of the controler on focus gained.
Therefore a focus listener is added to the technology dependent control.
All commands are deligated to seperate is[Command]Enabled and do[Command]
functions, to allow easy overwriting.
Field Summary |
---|
Fields inherited from class javax.rad.genui.UIComponent |
---|
bTranslate, lLastTranslationModified, parent, popupMenu |
Fields inherited from class javax.rad.genui.UIResource |
---|
uiResource |
Fields inherited from interface javax.rad.model.ui.IControllable |
---|
COMMAND_DELETE, COMMAND_DUPLICATE, COMMAND_EDIT, COMMAND_EXPORT, COMMAND_FIRST, COMMAND_INSERT, COMMAND_INSERT_SUB, COMMAND_LAST, COMMAND_NEXT, COMMAND_PREVIOUS, COMMAND_RESTORE, COMMAND_SEARCH |
Constructor Summary | |
---|---|
protected |
AbstractControllable(C pComponent)
Creates a new instance of AbstractControllable . |
Method Summary | |
---|---|
void |
addNotify()
Makes this UIComponent displayable by adding it to an UIContainer . |
static ICellFormatter |
createCellFormatter(java.lang.Object pCellFormatter,
java.lang.String pMethodName)
Creates a cell formatter instance with the given object and method name. |
static INodeFormatter |
createNodeFormatter(java.lang.Object pNodeFormatter,
java.lang.String pMethodName)
Creates a node formatter instance with the given object and method name. |
void |
doCommand(java.lang.String pCommand)
Performs the command. |
void |
doDelete()
Performs a delete on the current DataBook. |
void |
doDuplicate()
Sends the duplicate action to all listeners. |
void |
doEdit()
Starts editing. |
void |
doExport()
Performs the CSV Export of the current DataBook. |
void |
doFirst()
Selects the first row in the current DataBook. |
void |
doInsert()
Performs an insert on the current DataBook. |
void |
doInsertSub()
Performs an insert on the sub DataBook. |
void |
doLast()
Selects the last row in the current DataBook. |
void |
doNext()
Selects the next row in the current DataBook. |
void |
doNotifyController()
Notify the controller, that focus has changed. |
void |
doPrevious()
Selects the previous row in the current DataBook. |
void |
doRestore()
Performs a restore on the current DataBook. |
void |
doSearch()
Shows the search options. |
IController |
getController()
Gets the IController for this IControllable . |
boolean |
isCommandEnabled(java.lang.String pCommand)
Gets true, if the command should be enabled. |
boolean |
isDeleteEnabled()
True, if delete should be enabled. |
boolean |
isDuplicateEnabled()
Gets the duplicate button visibility. |
boolean |
isEditEnabled()
Gets the edit button visibility. |
boolean |
isExportEnabled()
Gets the export button visibility. |
boolean |
isFirstEnabled()
True, if first should be enabled. |
boolean |
isInsertEnabled()
True, if new should be enabled. |
boolean |
isInsertSubEnabled()
True, if new sub should be enabled. |
boolean |
isLastEnabled()
True, if last should be enabled. |
boolean |
isNextEnabled()
True, if next should be enabled. |
boolean |
isPreviousEnabled()
True, if previous should be enabled. |
boolean |
isRestoreEnabled()
True, if restore should be enabled. |
boolean |
isSearchEnabled()
Gets the search button visibility. |
void |
removeNotify()
Makes this UIComponent undisplayable by removing it to an UIContainer . |
void |
setController(IController pController)
Sets the IController for this IControllable . |
Methods inherited from class javax.rad.genui.UIResource |
---|
eventResourceChanged, eventResourceChanged, fireResourceChanged, getObject, getObjectNames, getUIResource, hasResourceHandler, putObject, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.rad.model.ui.IControllable |
---|
getActiveDataBook |
Constructor Detail |
---|
protected AbstractControllable(C pComponent)
AbstractControllable
.
pComponent
- the Component.IComponent
Method Detail |
---|
public IController getController()
IController
for this IControllable
.
getController
in interface IControllable
IController
public void setController(IController pController)
IController
for this IControllable
.
setController
in interface IControllable
pController
- the IController
public boolean isCommandEnabled(java.lang.String pCommand)
isCommandEnabled
in interface IControllable
pCommand
- the command
public void doCommand(java.lang.String pCommand) throws java.lang.Throwable
doCommand
in interface IControllable
pCommand
- the command
java.lang.Throwable
- if the command fails.public void addNotify()
UIComponent
displayable by adding it to an UIContainer
.
This method is called internally by the genui and should not be called directly.
addNotify
in class UIComponent<C extends IComponent>
UIComponent.removeNotify()
,
UIComponent.isNotified()
public void removeNotify()
UIComponent
undisplayable by removing it to an UIContainer
.
This method is called by the genui internally and should not be called directly.
Code overriding this method should call super.removeNotify
as the first line
of the overriding method.
removeNotify
in class UIComponent<C extends IComponent>
UIComponent.addNotify()
,
UIComponent.isNotified()
public void doNotifyController()
public boolean isFirstEnabled()
public void doFirst() throws ModelException
ModelException
- if selecting the first row is not possiblepublic boolean isLastEnabled()
public void doLast() throws ModelException
ModelException
- if selecting the last row is not possiblepublic boolean isPreviousEnabled()
public void doPrevious() throws ModelException
ModelException
- if selecting the previous row is not possiblepublic boolean isNextEnabled()
public void doNext() throws ModelException
ModelException
- if selecting the next is not possiblepublic boolean isInsertEnabled()
public void doInsert() throws ModelException
ModelException
- if insert is not possiblepublic boolean isInsertSubEnabled()
public void doInsertSub() throws ModelException
ModelException
- if insert sub is not possiblepublic boolean isDeleteEnabled()
public void doDelete() throws ModelException
ModelException
- if delete is not possiblepublic boolean isRestoreEnabled()
public void doRestore() throws ModelException
ModelException
- if restore is not possiblepublic boolean isDuplicateEnabled()
true
if visible, false
otherwisepublic void doDuplicate() throws ModelException
ModelException
- if an duplicate error occurspublic boolean isExportEnabled()
true
if visible, false
otherwisepublic void doExport() throws java.lang.Throwable
java.lang.Throwable
- if an export error occurspublic boolean isEditEnabled()
true
if visible, false
otherwisepublic void doEdit() throws ModelException
ModelException
- if an edit error occurspublic boolean isSearchEnabled()
true
if visible, false
otherwisepublic void doSearch() throws ModelException
ModelException
- if an export error occurspublic static ICellFormatter createCellFormatter(java.lang.Object pCellFormatter, java.lang.String pMethodName)
pCellFormatter
- the object.pMethodName
- the method name.
public static INodeFormatter createNodeFormatter(java.lang.Object pNodeFormatter, java.lang.String pMethodName)
pNodeFormatter
- the object.pMethodName
- the method name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |