All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.target.Trigger.Abstract

java.lang.Object
    |
    +----java.awt.swing.target.Trigger.Abstract

public abstract static class Trigger.Abstract
extends Object
implements Trigger

Variable Index

 o target

Constructor Index

 o Trigger.Abstract()
 o Trigger.Abstract(Object)

Method Index

 o canFire(Object)
Called during updateEnabled() to determine if this action should be enabled or not.
 o canSetTarget(Object)
 o clone()
Creates a new object of the same class as this object.
 o fire(EventObject)
 o fireEventAtTarget(EventObject, Object)
 o getResolvedTarget()
If rawTarget is null, find a target on the default TargetManager for this threadGroup
If rawTarget is a TargetManager, find a target on it
If rawTarget is any other kind of object, return it.
 o getTarget()
 o setTarget(Object)

Variables

 o target
protected Object target

Constructors

 o Trigger.Abstract
public Trigger.Abstract()
 o Trigger.Abstract
public Trigger.Abstract(Object target)

Methods

 o getTarget
public Object getTarget()
 o clone
public Object clone()
Creates a new object of the same class as this object.

Overrides:
clone in class Object
 o getResolvedTarget
public Object getResolvedTarget()
If rawTarget is null, find a target on the default TargetManager for this threadGroup
If rawTarget is a TargetManager, find a target on it
If rawTarget is any other kind of object, return it.

TargetManagers are searched by walking through their targets, handing each to this.canSetTarget(), and stopping if true is returned. If none pass that test, return null.

 o setTarget
public void setTarget(Object target)
 o canSetTarget
public boolean canSetTarget(Object candidate)
 o canFire
public boolean canFire(Object triggerOwner)
Called during updateEnabled() to determine if this action should be enabled or not.

Subclasses can override to determine if the current target is able to handle this action at this time. For example, the standard Paste command implements this as something like

 
 {
     Paster t = (Paster)this.getResolvedTarget();
     return t != null && t.canPaste();
 }

This default method returns this.getResolvedTarget() != null

 o fireEventAtTarget
public abstract void fireEventAtTarget(EventObject e,
                                       Object target)
 o fire
public void fire(EventObject e)

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature