|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.addin.BaseController
BaseController
class. Provides a default implementation
of the Controller
interface. Classes that extend this class
generally want the IDE controller to be their supervisor.
Constructor Summary | |
BaseController()
Default constructor for BaseController |
|
BaseController(View view)
Constructor. |
Method Summary | |
void |
checkCommands(Context context,
Controller activeController)
checkCommands() should be called on the controller associated with the active view whenever the Context changes. |
void |
checkToolbarCommands(Context context)
Checks the sensitivity of the toolbar commands. |
static void |
checkToolbarCommands(Context context,
View view,
Controller controller)
Checks the sensitivity of the actions associated with the specified view toolbar. |
View |
getView()
Get the view associated with this controller. |
boolean |
handleEvent(IdeAction action,
Context context)
This method is called when a user interaction with a View
triggers the execution of a command. |
Controller |
supervisor()
Gets the supervising controller |
boolean |
update(IdeAction action,
Context context)
This method updates the enabled status of the specified action within the specified context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BaseController()
public BaseController(View view)
Controller
is designed to handle
multiple views, this argument should be null.
Method Detail |
public View getView()
Controller
is designed to handle multiple views, this return value is null.
public Controller supervisor()
supervisor
in interface Controller
public boolean handleEvent(IdeAction action, Context context)
View
triggers the execution of a command.
handleEvent
in interface Controller
action
- action whose command is to be executed.
public boolean update(IdeAction action, Context context)
update
in interface Controller
action
- action whose command is to be executed.context
- the current context
public void checkCommands(Context context, Controller activeController)
checkCommands
in interface Controller
context
- the current context. Null values are acceptable.activeController
- the controller associated with the active view.
Null values are acceptable.public void checkToolbarCommands(Context context)
context
is null, the method uses the controller's
owning view context.
public static void checkToolbarCommands(Context context, View view, Controller controller)
view
toolbar. If the context is null
the method gets the view associated with the specified context. If
a toolbar action does not have a controller associated with it, or
if the action controller is the same as the specified
controller
, the specified controller's update()
method is called to check the action's sensitivity. Otherwise,
the action's controller is used.
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.