|
||||||||||
| 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 |
|---|
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.
This method is called internally by the genui and should not be called directly. |
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(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()
Performs an insert on the current DataBook. |
void |
doInsert()
Performs an insert on the current DataBook. |
void |
doInsertSub()
Performs an insert on the current DataBook. |
void |
doLast()
Performs an insert on the current DataBook. |
void |
doNext()
Performs an insert on the current DataBook. |
void |
doNotifyController()
Notify the controller, that focus has changed. |
void |
doPrevious()
Performs an insert on the current DataBook. |
void |
doRestore()
Performs a delete 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. |
List<IActionComponent> |
getCommandButtons(String pCommand)
Gets the registered button for the given command, or null otherwise. |
IController |
getController()
Gets the IController for this IControllable. |
Object |
getControllerProperty(String pName)
Gets the current value for a controller property. |
String[] |
getRegisteredCommands()
Gets all registered commands. |
boolean |
isCommandEnabled(String pCommand)
Gets true, if the command should be enabled. |
boolean |
isDeleteEnabled()
True, if new should be enabled. |
boolean |
isDuplicateEnabled()
Gets the duplicate button visibility. |
boolean |
isEditEnabled()
Gets the edit button visibility. |
boolean |
isExportEnabled()
Gets the duplicate button visibility. |
boolean |
isFirstEnabled()
True, if first should be enabled. |
boolean |
isInsertEnabled()
True, if new should be enabled. |
boolean |
isInsertSubEnabled()
True, if new should be enabled. |
boolean |
isLastEnabled()
True, if first should be enabled. |
boolean |
isNextEnabled()
True, if first should be enabled. |
boolean |
isPreviousEnabled()
True, if first should be enabled. |
boolean |
isRestoreEnabled()
True, if new 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(String pCommand,
IActionComponent pButton)
Registers a command button. |
void |
removeNotify()
Makes this 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 |
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(String pName,
Object pValue)
Sets a property for the controller. |
void |
unregisterAllCommandButtons()
Unregisters all command buttons. |
void |
unregisterCommandButton(String pCommand)
Unregisters a command button. |
void |
unregisterCommandButton(String pCommand,
IActionComponent pButton)
Unregisters a command button. |
| Methods inherited from class javax.rad.application.genui.Content |
|---|
createComponentName, getOpener, 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, beforeAddNotify, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout, setZOrder, updateTranslation |
| Methods inherited from class javax.rad.genui.UIResource |
|---|
equals, getObject, getObjectNames, getUIResource, hashCode, 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.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 IControllerIControllablepublic void setActiveControllable(IControllable pActiveControllable)
IControllable that should be controlled by this IController.
setActiveControllable in interface IControllerpActiveControllable - the current IControllable
public void setControllerProperty(String pName,
Object pValue)
setControllerProperty in interface IControllerpName - the property namepValue - the value. If the value is null the property will be removedpublic Object getControllerProperty(String pName)
getControllerProperty in interface IControllerpName - the property name
null if the property was not foundpublic IController getController()
IController for this IControllable.
getController in interface IControllableIControllerpublic void setController(IController pController)
IController for this IControllable.
setController in interface IControllablepController - the IControllerpublic 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 IControllableIDataBookpublic boolean isCommandEnabled(String pCommand)
isCommandEnabled in interface IControllablepCommand - the command
public void doCommand(String pCommand)
throws Throwable
doCommand in interface IControllablepCommand - the command
Throwable - if the command fails.public void cancelEditing()
DataBook.
cancelEditing in interface IControlpublic void notifyRepaint()
notifyRepaint in interface IControl
public void saveEditing()
throws ModelException
IDataBook or IDataRow.
saveEditing in interface IControlModelException - 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 ContentUIComponent.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(String pCommand,
IActionComponent pButton)
doConfigureCommandButtons.
pCommand - the commandpButton - the button
public void unregisterCommandButton(String pCommand,
IActionComponent pButton)
doConfigureCommandButtons.
pCommand - the commandpButton - the buttonpublic void unregisterCommandButton(String pCommand)
doConfigureCommandButtons.
pCommand - the commandpublic void unregisterAllCommandButtons()
doConfigureCommandButtons.
public String[] getRegisteredCommands()
doConfigureCommandButtons.
public List<IActionComponent> getCommandButtons(String pCommand)
doConfigureCommandButtons.
pCommand - the command
public IControllable getActiveControl()
public void doNotifyController()
public void doActiveControllableChanged()
throws Throwable
Throwable - if it fails
public void doActiveControlChanged()
throws Throwable
Throwable - if it fails
public void doActiveDataBookChanged()
throws Throwable
Throwable - if it fails
public void doConfigureCommandButtons()
throws Throwable
Throwable - if it failspublic boolean isFirstEnabled()
public void doFirst()
throws Throwable
Throwable - if an export error occurspublic boolean isLastEnabled()
public void doLast()
throws Throwable
Throwable - if an export error occurspublic boolean isPreviousEnabled()
public void doPrevious()
throws Throwable
Throwable - if an export error occurspublic boolean isNextEnabled()
public void doNext()
throws Throwable
Throwable - if an export error occurspublic boolean isInsertEnabled()
public void doInsert()
throws Throwable
Throwable - if an export error occurspublic boolean isInsertSubEnabled()
public void doInsertSub()
throws Throwable
Throwable - if an export error occurspublic boolean isDeleteEnabled()
public void doDelete()
throws Throwable
Throwable - if an export error occurspublic boolean isRestoreEnabled()
public void doRestore()
throws Throwable
Throwable - if an export error occurspublic boolean isDuplicateEnabled()
true if visible, false otherwise
public void doDuplicate()
throws Throwable
Throwable - if an export error occurspublic boolean isExportEnabled()
true if visible, false otherwise
public void doExport()
throws Throwable
Throwable - if an export error occurspublic boolean isEditEnabled()
true if visible, false otherwise
public void doEdit()
throws Throwable
Throwable - if an export error occurspublic boolean isSearchEnabled()
true if visible, false otherwise
public void doSearch()
throws Throwable
Throwable - if an export error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||