|
||||||||||
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.UIContainer<IPanel>
javax.rad.genui.container.UIPanel
javax.rad.application.genui.Content
javax.rad.application.genui.ControllerContent
public class ControllerContent
The ControllerContent
is the default IController
implementation and extends
an Content
.
Field Summary |
---|
Fields inherited from class javax.rad.genui.container.UIPanel |
---|
imgBack |
Fields inherited from class javax.rad.genui.UIContainer |
---|
allComponents, components |
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.IController |
---|
PROPERTY_SEARCH_VISIBLE |
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 | |
---|---|
ControllerContent()
Creates a new instance of ControllerContent . |
Method Summary | |
---|---|
void |
addNotify()
Makes this UIComponent displayable by adding it to an UIContainer . |
void |
cancelEditing()
Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook . |
void |
doActiveControlChanged()
This Method is invoked, if the active controllable control has changed. |
void |
doActiveControllableChanged()
This Method is invoked, if the active controllable has changed. |
void |
doActiveDataBookChanged()
This Method is invoked, if the active data book has changed. |
void |
doCommand(java.lang.String pCommand)
Performs the command. |
void |
doConfigureCommandButtons()
This Method is invoked, when the data book has been changed, and the buttons have to be configured. |
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. |
IControllable |
getActiveControl()
Gets the real control that caused the focus event. |
IControllable |
getActiveControllable()
Gets the active IControllable that should be controlled by this IController . |
IDataBook |
getActiveDataBook()
Gets the controllable IDataBook for this IControllable . |
java.util.List<IActionComponent> |
getCommandButtons(java.lang.String pCommand)
Gets the registered button for the given command, or null otherwise. |
IController |
getController()
Gets the IController for this IControllable . |
java.lang.Object |
getControllerProperty(java.lang.String pName)
Gets the current value for a controller property. |
java.lang.String[] |
getRegisteredCommands()
Gets all registered commands. |
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 |
notifyRepaint()
The control need to check if the part is visible and then repaint the part. |
void |
registerCommandButton(java.lang.String pCommand,
IActionComponent pButton)
Registers a command button. |
void |
removeNotify()
Makes this UIComponent undisplayable by removing it to an UIContainer . |
void |
saveEditing()
Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow . |
void |
setActiveControllable(IControllable pActiveControllable)
Sets the active IControllable that should be controlled by this IController . |
void |
setController(IController pController)
Sets the IController for this IControllable . |
void |
setControllerProperty(java.lang.String pName,
java.lang.Object pValue)
Sets a property for the controller. |
void |
unregisterAllCommandButtons()
Unregisters all command buttons. |
void |
unregisterCommandButton(java.lang.String pCommand)
Unregisters a command button. |
void |
unregisterCommandButton(java.lang.String pCommand,
IActionComponent pButton)
Unregisters a command button. |
Methods inherited from class javax.rad.application.genui.Content |
---|
createComponentName, getOpener, isDestroyed, notifyDestroy, notifyVisible, setOpener |
Methods inherited from class javax.rad.genui.container.UIPanel |
---|
getBackgroundImage, setBackgroundImage |
Methods inherited from class javax.rad.genui.UIContainer |
---|
add, add, add, add, addInternal, beforeAddNotify, checkAdd, contains, getComponent, getComponentCount, getComponents, getInsets, getLayout, getUIResourceContainer, indexOf, remove, remove, removeAll, removeInternal, setLayout, setUIResourceContainer, setZOrder, updateTranslation |
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.ITranslatable |
---|
getTranslation, isTranslationEnabled, setTranslation, setTranslationEnabled |
Methods inherited from interface javax.rad.util.ITranslator |
---|
translate |
Methods inherited from interface javax.rad.ui.IResource |
---|
getResource |
Methods inherited from interface javax.rad.ui.IContainer |
---|
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout |
Constructor Detail |
---|
public ControllerContent()
ControllerContent
.
Method Detail |
---|
public IControllable getActiveControllable()
IControllable
that should be controlled by this IController
.
getActiveControllable
in interface IController
IControllable
public void setActiveControllable(IControllable pActiveControllable)
IControllable
that should be controlled by this IController
.
setActiveControllable
in interface IController
pActiveControllable
- the current IControllable
public void setControllerProperty(java.lang.String pName, java.lang.Object pValue)
setControllerProperty
in interface IController
pName
- the property namepValue
- the value. If the value is null
the property will be removedpublic java.lang.Object getControllerProperty(java.lang.String pName)
getControllerProperty
in interface IController
pName
- the property name
null
if the property was not foundpublic 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 IDataBook getActiveDataBook()
IDataBook
for this IControllable
.
IEditorControl should return the set data row, if it is instanceof IDataBook or null otherwise.
ITableControl should return the set data book.
ITreeControl should return the data book of the current selected node.
The controller has to be informed, If the databook changes on a focused IControllable.
eg: ITreeControl node selection of a different databook.
Editor or table has the focus, and a different databook is set on editor or table.
getActiveDataBook
in interface IControllable
IDataBook
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 cancelEditing()
DataBook
.
cancelEditing
in interface IControl
public void notifyRepaint()
notifyRepaint
in interface IControl
public void saveEditing() throws ModelException
IDataBook
or IDataRow
.
saveEditing
in interface IControl
ModelException
- if the value can not be stored.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 Content
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 UIContainer<IPanel>
UIComponent.addNotify()
,
UIComponent.isNotified()
public void registerCommandButton(java.lang.String pCommand, IActionComponent pButton)
doConfigureCommandButtons
.
pCommand
- the commandpButton
- the buttonpublic void unregisterCommandButton(java.lang.String pCommand, IActionComponent pButton)
doConfigureCommandButtons
.
pCommand
- the commandpButton
- the buttonpublic void unregisterCommandButton(java.lang.String pCommand)
doConfigureCommandButtons
.
pCommand
- the commandpublic void unregisterAllCommandButtons()
doConfigureCommandButtons
.
public java.lang.String[] getRegisteredCommands()
doConfigureCommandButtons
.
public java.util.List<IActionComponent> getCommandButtons(java.lang.String pCommand)
doConfigureCommandButtons
.
pCommand
- the command
public IControllable getActiveControl()
public void doNotifyController()
public void doActiveControllableChanged() throws java.lang.Throwable
java.lang.Throwable
- if it failspublic void doActiveControlChanged() throws java.lang.Throwable
java.lang.Throwable
- if it failspublic void doActiveDataBookChanged() throws java.lang.Throwable
java.lang.Throwable
- if it failspublic void doConfigureCommandButtons() throws java.lang.Throwable
java.lang.Throwable
- if it failspublic boolean isFirstEnabled()
public void doFirst() throws java.lang.Throwable
java.lang.Throwable
- if the row cannot be selectedpublic boolean isLastEnabled()
public void doLast() throws java.lang.Throwable
java.lang.Throwable
- if the last row cannot be selectedpublic boolean isPreviousEnabled()
public void doPrevious() throws java.lang.Throwable
java.lang.Throwable
- if the previous row cannot be selectedpublic boolean isNextEnabled()
public void doNext() throws java.lang.Throwable
java.lang.Throwable
- if the next row cannot be selectedpublic boolean isInsertEnabled()
public void doInsert() throws java.lang.Throwable
java.lang.Throwable
- if insert is not possiblepublic boolean isInsertSubEnabled()
public void doInsertSub() throws java.lang.Throwable
java.lang.Throwable
- if insert in the sub is not possiblepublic boolean isDeleteEnabled()
public void doDelete() throws java.lang.Throwable
java.lang.Throwable
- if delete is not possiblepublic boolean isRestoreEnabled()
public void doRestore() throws java.lang.Throwable
java.lang.Throwable
- if restore is not possiblepublic boolean isDuplicateEnabled()
true
if visible, false
otherwisepublic void doDuplicate() throws java.lang.Throwable
java.lang.Throwable
- if an export 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 java.lang.Throwable
java.lang.Throwable
- if an export error occurspublic boolean isSearchEnabled()
true
if visible, false
otherwisepublic void doSearch() throws java.lang.Throwable
java.lang.Throwable
- if an export error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |