dip.gui.order
Class GUIDefineState

java.lang.Object
  extended bydip.order.Order
      extended bydip.order.DefineState
          extended bydip.gui.order.GUIDefineState
All Implemented Interfaces:
GUIOrder, Orderable, java.io.Serializable

public class GUIDefineState
extends DefineState
implements GUIOrder

GUIOrder subclass of DefineState order.

This is essentially a placeholder. It is incomplete, and should only be used (derived from) existing DefineState orders. No locations may be set via GUIOrder methods, and the order will not be valid if created without derivation. This may change in future implementations.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class dip.gui.order.GUIOrder
GUIOrder.MapInfo, GUIOrder.Parameter, GUIOrder.StateInfo
 
Field Summary
 
Fields inherited from class dip.order.Order
ORD_VAL_BORDER, power, src, srcUnitType
 
Fields inherited from interface dip.gui.order.GUIOrder
BORDER_INVALID, CANCELED, CLICK_TO_CANCEL, CLICK_TO_ISSUE, COMPLETE, LAYER_HIGHEST, LAYER_LOWEST, LAYER_TYPICAL, NO_DISLODGED_UNIT, NO_UNIT, NOT_IN_PROVINCE, NOT_OWNER
 
Constructor Summary
protected GUIDefineState()
          Creates a GUIDefineState
protected GUIDefineState(Power power, Location source, Unit.Type sourceUnitType)
          Creates a GUIDefineState
 
Method Summary
 boolean clearLocations()
          Always returns false.
 void deriveFrom(Orderable order)
          This only accepts DefineState orders.
 int getCurrentLocationNum()
          Always returns 0.
 int getNumRequiredLocations()
          Always returns 0.
 java.lang.Object getParam(GUIOrder.Parameter param)
          Always throws an IllegalArgumentException
 boolean isComplete()
          Always returns true.
 boolean isDependent()
          Indicates if this order is dependent upon the state of other orders for drawing.
 void removeFromDOM(GUIOrder.MapInfo mapInfo)
          Removes order from the DOM
 boolean setLocation(GUIOrder.StateInfo stateInfo, Location location, java.lang.StringBuffer sb)
          Always returns false.
 void setParam(GUIOrder.Parameter param, java.lang.Object value)
          Always throws an IllegalArgumentException
 boolean testLocation(GUIOrder.StateInfo stateInfo, Location location, java.lang.StringBuffer sb)
          Always returns false.
 void updateDOM(GUIOrder.MapInfo mapInfo)
          Updates the DOM, given the given parameters.
 
Methods inherited from class dip.order.DefineState
determineDependencies, equals, evaluate, getBriefName, getDefaultFormat, getFullName, toBriefString, toFullString, validate, verify
 
Methods inherited from class dip.order.Order
addSupportsOfAndMovesToSource, appendBrief, appendFull, checkPower, checkSeasonAdjustment, checkSeasonMovement, checkSeasonRetreat, getPower, getSource, getSourceUnitType, getValidatedUnitType, toFormattedString, toString, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dip.order.Orderable
determineDependencies, evaluate, getBriefName, getDefaultFormat, getFullName, getPower, getSource, getSourceUnitType, toBriefString, toFormattedString, toFullString, validate, verify
 

Constructor Detail

GUIDefineState

protected GUIDefineState()
Creates a GUIDefineState


GUIDefineState

protected GUIDefineState(Power power,
                         Location source,
                         Unit.Type sourceUnitType)
                  throws OrderException
Creates a GUIDefineState

Method Detail

deriveFrom

public void deriveFrom(Orderable order)
This only accepts DefineState orders. All others will throw an IllegalArgumentException.

Specified by:
deriveFrom in interface GUIOrder

testLocation

public boolean testLocation(GUIOrder.StateInfo stateInfo,
                            Location location,
                            java.lang.StringBuffer sb)
Always returns false.

Specified by:
testLocation in interface GUIOrder

clearLocations

public boolean clearLocations()
Always returns false.

Specified by:
clearLocations in interface GUIOrder

setLocation

public boolean setLocation(GUIOrder.StateInfo stateInfo,
                           Location location,
                           java.lang.StringBuffer sb)
Always returns false.

Specified by:
setLocation in interface GUIOrder

isComplete

public boolean isComplete()
Always returns true.

Specified by:
isComplete in interface GUIOrder

getNumRequiredLocations

public int getNumRequiredLocations()
Always returns 0.

Specified by:
getNumRequiredLocations in interface GUIOrder

getCurrentLocationNum

public int getCurrentLocationNum()
Always returns 0.

Specified by:
getCurrentLocationNum in interface GUIOrder

setParam

public void setParam(GUIOrder.Parameter param,
                     java.lang.Object value)
Always throws an IllegalArgumentException

Specified by:
setParam in interface GUIOrder

getParam

public java.lang.Object getParam(GUIOrder.Parameter param)
Always throws an IllegalArgumentException

Specified by:
getParam in interface GUIOrder
Returns:
set parameter, or null if no parameter has been set.

removeFromDOM

public void removeFromDOM(GUIOrder.MapInfo mapInfo)
Description copied from interface: GUIOrder
Removes order from the DOM

Specified by:
removeFromDOM in interface GUIOrder

updateDOM

public void updateDOM(GUIOrder.MapInfo mapInfo)
Description copied from interface: GUIOrder
Updates the DOM, given the given parameters. Adds if appropriate.

Specified by:
updateDOM in interface GUIOrder

isDependent

public boolean isDependent()
Description copied from interface: GUIOrder
Indicates if this order is dependent upon the state of other orders for drawing.

Specified by:
isDependent in interface GUIOrder


Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.