com.azalient.api.b.network
Interface ITrail

All Superinterfaces:
IActionable, IAssociate, IClippable, IDeletable, IDraggable, IPastable, IRecord, ISequence, RecordR, RecordRW, RecordW, SortableData, StoreRecordRW

public interface ITrail
extends IClippable, IPastable, IAssociate, ISequence, StoreRecordRW

A trail is a sequence of route branches, wither links or walkways


Field Summary
static String EXTENDER
          A special token used to mark a trial has having been broken by cut and paste, and only a partial trail remains
static ITrail[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Fields inherited from interface com.azalient.api.ui.clipboard.IClippable
scratch
 
Fields inherited from interface com.azalient.api.a.tables.IRecord
DELETED, KEY_SEP, KEY_SEP_CHAR
 
Method Summary
 void add(IUserTwig twig)
          Add twig at end of trail
 void addAtStart(IUserTwig twig)
          Add twig at beginning of trail
 boolean contains(IUserTwig twig)
          return true if given twig is in this trail
 ITrail copy()
          Create a copy of this trail
 void fireBisected(IUserTwig deleted, IUserTwig twig1, IUserTwig twig2)
          Fired if a twig in this trail has been bisected @CommuterInternal
 void fireCombined(IUserTwig twig1, IUserTwig twig2deleted)
          Fired if two twigs in this trail have been combined @CommuterInternal
 IUserTwig first()
          Return the first branch in the sequence
 boolean isLift()
          Returns true if this is a lift trail
 ITrail join(String trailName, ITrail that)
          Join this trail to that, creating a new trail of the given name
 IUserTwig last()
          Return the last branch in the sequence
 double length()
          Sum of length of all twigs in trail
 boolean liftDown()
          Returns true if this is a downward lift trail
 boolean liftUp()
          Returns true if this is an upward lift trail
 boolean measure()
          return true if this trail is to be measured
 void measure(boolean b)
          Switch measurement on for this trail
 int nTwigs()
           
 void prune1()
          Remove first twig from trail
 void pruneN()
          Remove last twig from trail
 boolean selected()
          True if this is selected in GUI
 void selected(boolean v)
          Set to true to highlight this as selected in GUI
 IUserTwig twig(int index)
          Return twig in trail: index 1..N
 IUserTwig[] twigs()
          The twigs in the trail, in sequence
 
Methods inherited from interface com.azalient.api.ui.clipboard.IClippable
children, getAlt, references, tableName
 
Methods inherited from interface com.azalient.api.ui.clipboard.IDeletable
delete, deleted, name
 
Methods inherited from interface com.azalient.api.ui.clipboard.IPastable
finish, pickables
 
Methods inherited from interface com.azalient.api.ui.clipboard.IAssociate
clip, name, proxy, selected
 
Methods inherited from interface com.azalient.api.ui.clipboard.IDraggable
selectedForDraggingDraw
 
Methods inherited from interface com.azalient.api.ui.clipboard.IActionable
action
 
Methods inherited from interface com.azalient.api.file.StoreRecordRW
canRename, rename, store
 
Methods inherited from interface com.azalient.api.file.RecordR
extraSet, finished, isApplicable, isEditable, set
 
Methods inherited from interface com.azalient.api.a.tables.IRecord
name
 
Methods inherited from interface com.azalient.api.file.RecordW
extraCols, extraGet, extraGetB, extraGetD, extraGetI, extraGetS, extraGetT, isVolatile
 
Methods inherited from interface com.azalient.api.b.network.ISequence
canJoinTo, components, endLocation, extend, extendBack, extensionBackSequence, extensionBackSequenceName, extensionBackSequences, extensionSequence, extensionSequenceName, extensionSequences, info, join, rename, startLocation
 

Field Detail

ZERO

static final ITrail[] ZERO
A static zero-length array, created for convenience, and to save memory


EXTENDER

static final String EXTENDER
A special token used to mark a trial has having been broken by cut and paste, and only a partial trail remains

See Also:
Constant Field Values
Method Detail

addAtStart

void addAtStart(IUserTwig twig)
Add twig at beginning of trail


add

void add(IUserTwig twig)
Add twig at end of trail


prune1

void prune1()
Remove first twig from trail

Specified by:
prune1 in interface ISequence

pruneN

void pruneN()
Remove last twig from trail

Specified by:
pruneN in interface ISequence

nTwigs

int nTwigs()

twig

IUserTwig twig(int index)
Return twig in trail: index 1..N


twigs

IUserTwig[] twigs()
The twigs in the trail, in sequence

Specified by:
twigs in interface ISequence

contains

boolean contains(IUserTwig twig)
return true if given twig is in this trail


length

double length()
Sum of length of all twigs in trail


copy

ITrail copy()
Create a copy of this trail

Specified by:
copy in interface ISequence

join

ITrail join(String trailName,
            ITrail that)
Join this trail to that, creating a new trail of the given name


selected

boolean selected()
True if this is selected in GUI

Specified by:
selected in interface IDraggable

selected

void selected(boolean v)
Set to true to highlight this as selected in GUI


fireBisected

void fireBisected(IUserTwig deleted,
                  IUserTwig twig1,
                  IUserTwig twig2)
Fired if a twig in this trail has been bisected @CommuterInternal


fireCombined

void fireCombined(IUserTwig twig1,
                  IUserTwig twig2deleted)
Fired if two twigs in this trail have been combined @CommuterInternal


liftDown

boolean liftDown()
Returns true if this is a downward lift trail


liftUp

boolean liftUp()
Returns true if this is an upward lift trail


isLift

boolean isLift()
Returns true if this is a lift trail


first

IUserTwig first()
Return the first branch in the sequence


last

IUserTwig last()
Return the last branch in the sequence


measure

boolean measure()
return true if this trail is to be measured


measure

void measure(boolean b)
Switch measurement on for this trail