Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

javax.ide.command
Class Controller

java.lang.Object
  extended by javax.ide.command.Controller

public final class Controller
extends java.lang.Object

Controllers encapulate extension defined UpdateHandlers and InvokeHandlers. Generally, Views use controllers to check whether a context sensitive command can be executed given the current context, and to do the actual execution of that command.


Constructor Summary
Controller(InvokeHandler invokeHandler, UpdateHandler updateHandler)
          Constructs a controller object.
Controller(MetaClass invokeHandlerClass, MetaClass updateHandlerClass)
          Constructs a controller object, deferring class loading and instantiation of its invoke and update handler objects until needed.
 
Method Summary
 InvokeHandler getInvokeHandler()
          Get the invoke handler for this controller.
 UpdateHandler getUpdateHandler()
          Get the update handler for this controller.
 boolean isContextSensitive()
          Get whether this controller is context sensitive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Controller

public Controller(MetaClass invokeHandlerClass,
                  MetaClass updateHandlerClass)
Constructs a controller object, deferring class loading and instantiation of its invoke and update handler objects until needed. Generally, this is only used by IDE implementations when loading controllers from the manifest file.

Parameters:
invokeHandlerClass - a metaclass of an InvokeHandler.
updateHandlerClass - a metaclass of an UpdateHandler. May be null.

Controller

public Controller(InvokeHandler invokeHandler,
                  UpdateHandler updateHandler)
Constructs a controller object.

Parameters:
invokeHandler - the invocation handler. Must not be null.
updateHandler - the update handler. May be null for actions which are always enabled.
Method Detail

getInvokeHandler

public InvokeHandler getInvokeHandler()
Get the invoke handler for this controller.

Returns:
the invoke handler for this controller. Will never return null.

getUpdateHandler

public UpdateHandler getUpdateHandler()
Get the update handler for this controller.

Returns:
the update handler for this controller. If the action is always enabled, returns a handler that always sets the action enabled. Will never return null.

isContextSensitive

public boolean isContextSensitive()
Get whether this controller is context sensitive. A context sensitive controller has an associated UpdateHandler that adjusts the action based on the context.

Returns:
true if the UpdateHandler associated with this Controller may change the state of the action based on the context.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.