| java.lang.Object com.jeta.open.gui.framework.JETAController
All known Subclasses: com.jeta.swingbuilder.gui.images.ImagePropertiesController, com.jeta.swingbuilder.gui.main.FormEditorController, com.jeta.swingbuilder.gui.utils.TableSupportHandler, com.jeta.swingbuilder.gui.border.CompoundBorderController, com.jeta.swingbuilder.gui.colorchooser.RecentSwatchController, com.jeta.swingbuilder.gui.font.FontViewController, com.jeta.swingbuilder.gui.main.CellConstraintsController, com.jeta.swingbuilder.gui.beanmgr.BeanManagerController, com.jeta.swingbuilder.gui.main.SpecViewController, com.jeta.swingbuilder.codegen.gui.editor.SourceController, com.jeta.swingbuilder.gui.effects.RadialViewController, com.jeta.swingbuilder.gui.components.line.CompoundLineController, com.jeta.swingbuilder.gui.project.ProjectSettingsController, com.jeta.swingbuilder.gui.components.scrollbars.ScrollPolicyController, com.jeta.swingbuilder.gui.effects.GradientViewController, com.jeta.swingbuilder.gui.components.list.ListItemController, com.jeta.swingbuilder.gui.components.line.LinePropertiesController, com.jeta.swingbuilder.gui.effects.PaintAssignmentController,
JETAController | abstract public class JETAController (Code) | | This is the base class for all controllers in an application. We follow the
model-view-controller pattern extensively in the UI. All controllers should
derive from this class. A controller is resposible for all event handlers for
a JETAPanel (JETAPanels handle only layout and view logic). This controller
class also supports disabling listeners. This is useful when updating a view
with components that fire events when changed programmatically such as
JComboBoxes. See
JETAController.enableEvents . Usage:
class MyController extends JETAController {
public MyController(JETAContainer view) {
super(view);
// assign a button handler. If the view has a menu and toolbar button
// for the same command, this assignAction method will install handlers
// on both.
assignAction(MyViewNames.ID_LOGIN_BUTTON, new LoginAction());
// assign other listeners
}
public class LoginAction implements ActionListener {
public void actionPerformed(ActionEvent evt) {
MyFrame frame = (MyFrame) getView();
//...
}
}
}
author: Jeff Tassin |
Inner Class :public class TextFocusListener implements FocusListener | |
Inner Class :public static class ListenerManager | |
JETAController | public JETAController(JETAContainer view)(Code) | | ctor
Parameters: view - the view whose events we are handling. |
actionPerformed | public boolean actionPerformed(String actionName, ActionEvent evt)(Code) | | Forwarded from the view when an action occurs. This method Lookups up the
name of any ActionListener in the m_commands hash map that corresponds to
the actionName. It then invokes the
See Also: java.awt.ActionListener.actionPerformed See Also: method if a component is See Also: found. Parameters: actionName - the name of the action associated with the event Parameters: evt - the action event true if the controller handled the action |
assignAction | public void assignAction(String compName, ActionListener action)(Code) | | Registers and ActionListener with this controller. This controller adds
itself as a listener to all components with the given name in the
associated view.
|
assignComponentAction | protected void assignComponentAction(Component comp, String commandId, ActionListener action)(Code) | | Registers this controller as an action listener with all components that
have the given name found in the associated view.
|
assignListener | public void assignListener(String compName, ChangeListener listener)(Code) | | Assigns a change listener to the Component for the given name - assuming
the component has method addChangeListener( ChangeListener )
|
enableEvents | public void enableEvents(boolean enable)(Code) | | Sets the flag that indicates if listener/action events should be
propagated to registered listeners
|
getAction | public ActionListener getAction(String actionName)(Code) | | Returns the first action listener associated with the given name. If the
listener is not found, null is returned
the action listener associated with the given component. |
getPrimaryActionListener | public ActionListener getPrimaryActionListener()(Code) | | Returns the main action listener that is registered with components in
the associated view.
the main action listener |
getView | public JETAContainer getView()(Code) | | Returns the view that is associated with this controller.
|
invokeAction | public boolean invokeAction(String actionName)(Code) | | Invokes the action assigned to the given name
|
isEventsEnabled | public boolean isEventsEnabled()(Code) | | the flag that indicates if listener/action events should bepropagated to registered listeners |
stateChanged | public void stateChanged(ChangeEvent e)(Code) | | Forwarded from the view when a change event occurs.
|
updateComponents | public void updateComponents(Object src)(Code) | | Forwards the call to the UIDirector if it is not null
|
valueChanged | public void valueChanged(ListSelectionEvent e)(Code) | | Forwarded from the view when a list selection event occurs. This method
Parameters: e - the list selection event |
|
|