Fields inherited from class | Fields |
---|---|
class org.eclipse.swt.widgets.Link |
handle |
Type | Name and description |
---|---|
Number |
color |
T |
end1 |
T |
end2 |
boolean |
hiddenQ |
double |
labelColor |
LinkFactory |
myLinkFactory |
Observer |
myObserver |
Type Params | Return Type | Name and description |
---|---|---|
|
AgentSet<Link> |
allLinks() {@inheritDoc} |
|
boolean |
allQ(Collection a, Closure closure) Queries if all agents in a collection are true for a boolean closure. |
|
void |
ask(AgentSet<? extends ReLogoAgent> a, Closure askBlock) Executes a set of commands for an agentset in random order. |
|
void |
ask(Collection<? extends ReLogoAgent> c, Closure askBlock) Executes a set of commands for a collection of agents. |
|
void |
ask(Turtle t, Closure askBlock) Executes a set of commands for a turtle. |
|
void |
ask(Patch p, Closure askBlock) Executes a set of commands for a patch. |
|
void |
ask(Link l, Closure askBlock) Executes a set of commands for a link. |
|
void |
askCollection(Collection<? extends ReLogoAgent> c, Closure cl) |
|
void |
askLink(Closure cl) @exclude |
|
AgentSet<Turtle> |
bothEnds() Returns two agents connected by link. |
|
int |
compareTo(Link l) |
|
void |
die() Removes the link. |
|
void |
fileShow(Object value) Prints value with agent identifier to current file with a newline. |
|
void |
free() Joins together two ends of a link and ties the movements of the ends, except for headings. |
|
double |
getColor() Returns the color of a link. |
|
T |
getEnd1() Returns the first turtle of a link. |
|
T |
getEnd2() Returns the second turtle of a link. |
|
double |
getLabelColor() Returns the label color for a turtle or link. @ returns label color in the range [0, 140) |
|
String |
getLinkType() |
|
int |
getMaxPxcor() Returns the maximum x coordinate for all patches. |
|
int |
getMaxPycor() Returns the maximum y coordinate for all patches. |
|
int |
getMinPxcor() Returns the minimum x coordinate for all patches. |
|
int |
getMinPycor() Returns the minimum y coordinate for all patches. |
|
LinkFactory |
getMyLinkFactory() |
|
Observer |
getMyObserver() |
|
void |
hideLink() Link appears hidden. |
|
boolean |
isHiddenQ() Queries if caller is hidden. |
|
Link |
link(Number oneEnd, Number otherEnd) Returns the link between two turtles. |
|
Link |
link(Turtle oneEnd, Turtle otherEnd) Returns the link between two turtles. |
|
double |
linkHeading() Returns the heading of a link. |
|
double |
linkLength() Returns the length of a link. |
|
AgentSet<Link> |
links() {@inheritDoc} |
|
AgentSet |
maxNOf(int number, Collection<? extends ReLogoAgent> a, Closure closure) Returns an agentset consisting of a specified number of agents which have the greatest value when operated on by a set of commands. |
|
ReLogoAgent |
maxOneOf(Collection<? extends ReLogoAgent> a, Closure closure) Returns the ReLogoAgent with the largest value when operated on by a set of commands. |
|
AgentSet |
minNOf(int number, Collection<? extends ReLogoAgent> a, Closure closure) Returns an agentset consisting of a specified number of agents which have the lowest value when operated on by a set of commands. |
|
ReLogoAgent |
minOneOf(Collection<? extends ReLogoAgent> a, Closure closure) Returns the ReLogoAgent with the smallest value when operated on by a set of commands. |
|
Object |
myself() The agent that initiated the asking. |
|
Stop |
oldStop() Stops a link executing within a command closure. |
|
AgentSet |
other(Collection a) Returns an agentset minus the caller. |
|
Turtle |
otherEnd() Returns the turtle opposite the asking turtle. |
|
Patch |
patch(Number nX, Number nY) Returns the patch containing a point. |
|
AgentSet<Patch> |
patches() Returns an agentset containing all patches. |
|
int |
randomPxcor() Returns a random x coordinate for patches. |
|
int |
randomPycor() Returns a random y coordinate for patches. |
|
double |
randomXcor() Returns a random x coordinate for turtles. |
|
double |
randomYcor() Returns a random y coordinate for turtles. |
|
void |
run(String string) Interprets a string as commands then runs the commands. |
|
Object |
runresult(String string) Interprets a string as a command then returns the result. |
|
Link |
self() Returns this turtle, patch, or link. |
|
void |
setBaseLinkProperties(Observer observer, LinkFactory linkFactory, T source, T target, boolean directed, Number weight) |
|
void |
setColor(Number color) Sets the color of a link to the value color. |
|
void |
setEnd1(T end1) Sets the first turtle of a link to end1. |
|
void |
setEnd2(T end2) Sets the second turtle of a link to end2. |
|
void |
setHiddenQ(boolean hidden) Sets link visibility. |
|
void |
setLabelColor(Number labelColor) Sets the label color for a link to labelColor. |
|
void |
setMyLinkFactory(LinkFactory myLinkFactory) |
|
void |
setMyObserver(Observer myObserver) |
|
void |
setMyself(Object o) Sets the agent that initiated the asking to the value o. |
|
void |
show(Object value) Prints value with agent identifier to the console. |
|
void |
showLink() Makes link visible. |
|
void |
tie() Joins together two ends of a link and ties the movements of the ends. |
|
String |
toString() This method provides a human-readable name for the agent. |
|
Turtle |
turtle(Number number) Returns the turtle of the given number. |
|
AgentSet<Turtle> |
turtles() Returns an agentset containing all turtles. |
|
AgentSet<Turtle> |
turtlesOn(Patch p) Returns an agentset of turtles on a given patch. |
|
AgentSet<Turtle> |
turtlesOn(Turtle t) Returns an agentset of turtles on the same patch as a turtle. |
|
AgentSet<Turtle> |
turtlesOn(Collection a) Returns an agentset of turtles on the patches in a collection or on the patches that a collection of turtles are. |
|
void |
untie() Unties two ends of a link. |
|
int |
worldHeight() Returns the height of the world. |
|
int |
worldWidth() Returns the width of the world. |
Methods inherited from class | Name |
---|---|
class org.eclipse.swt.widgets.Link |
org.eclipse.swt.widgets.Link#getText(), org.eclipse.swt.widgets.Link#setText(java.lang.String), org.eclipse.swt.widgets.Link#getLinkForeground(), org.eclipse.swt.widgets.Link#setLinkForeground(org.eclipse.swt.graphics.Color), org.eclipse.swt.widgets.Link#addSelectionListener(org.eclipse.swt.events.SelectionListener), org.eclipse.swt.widgets.Link#removeSelectionListener(org.eclipse.swt.events.SelectionListener), org.eclipse.swt.widgets.Link#update(), org.eclipse.swt.widgets.Link#getBounds(), org.eclipse.swt.widgets.Link#getLocation(), org.eclipse.swt.widgets.Link#getParent(), org.eclipse.swt.widgets.Link#print(org.eclipse.swt.graphics.GC), org.eclipse.swt.widgets.Link#getSize(), org.eclipse.swt.widgets.Link#setParent(org.eclipse.swt.widgets.Composite), org.eclipse.swt.widgets.Link#getRegion(), org.eclipse.swt.widgets.Link#setSize(int, int), org.eclipse.swt.widgets.Link#setSize(org.eclipse.swt.graphics.Point), org.eclipse.swt.widgets.Link#isEnabled(), org.eclipse.swt.widgets.Link#setRegion(org.eclipse.swt.graphics.Region), org.eclipse.swt.widgets.Link#getFont(), org.eclipse.swt.widgets.Link#setFont(org.eclipse.swt.graphics.Font), org.eclipse.swt.widgets.Link#getForeground(), org.eclipse.swt.widgets.Link#isVisible(), org.eclipse.swt.widgets.Link#setVisible(boolean), org.eclipse.swt.widgets.Link#setEnabled(boolean), org.eclipse.swt.widgets.Link#setForeground(org.eclipse.swt.graphics.Color), org.eclipse.swt.widgets.Link#getBackground(), org.eclipse.swt.widgets.Link#setBackground(org.eclipse.swt.graphics.Color), org.eclipse.swt.widgets.Link#getToolTipText(), org.eclipse.swt.widgets.Link#setBounds(org.eclipse.swt.graphics.Rectangle), org.eclipse.swt.widgets.Link#setBounds(int, int, int, int), org.eclipse.swt.widgets.Link#setToolTipText(java.lang.String), org.eclipse.swt.widgets.Link#traverse(int, org.eclipse.swt.widgets.Event), org.eclipse.swt.widgets.Link#traverse(int, org.eclipse.swt.events.KeyEvent), org.eclipse.swt.widgets.Link#traverse(int), org.eclipse.swt.widgets.Link#addFocusListener(org.eclipse.swt.events.FocusListener), org.eclipse.swt.widgets.Link#addKeyListener(org.eclipse.swt.events.KeyListener), org.eclipse.swt.widgets.Link#addMouseListener(org.eclipse.swt.events.MouseListener), org.eclipse.swt.widgets.Link#addMouseWheelListener(org.eclipse.swt.events.MouseWheelListener), org.eclipse.swt.widgets.Link#setCursor(org.eclipse.swt.graphics.Cursor), org.eclipse.swt.widgets.Link#getCursor(), org.eclipse.swt.widgets.Link#setMenu(org.eclipse.swt.widgets.Menu), org.eclipse.swt.widgets.Link#isReparentable(), org.eclipse.swt.widgets.Link#setOrientation(int), org.eclipse.swt.widgets.Link#getOrientation(), org.eclipse.swt.widgets.Link#computeSize(int, int), org.eclipse.swt.widgets.Link#computeSize(int, int, boolean), org.eclipse.swt.widgets.Link#addMenuDetectListener(org.eclipse.swt.events.MenuDetectListener), org.eclipse.swt.widgets.Link#addMouseMoveListener(org.eclipse.swt.events.MouseMoveListener), org.eclipse.swt.widgets.Link#addMouseTrackListener(org.eclipse.swt.events.MouseTrackListener), org.eclipse.swt.widgets.Link#addDragDetectListener(org.eclipse.swt.events.DragDetectListener), org.eclipse.swt.widgets.Link#addTraverseListener(org.eclipse.swt.events.TraverseListener), org.eclipse.swt.widgets.Link#removeTouchListener(org.eclipse.swt.events.TouchListener), org.eclipse.swt.widgets.Link#internal_dispose_GC(long, org.eclipse.swt.graphics.GCData), org.eclipse.swt.widgets.Link#removePaintListener(org.eclipse.swt.events.PaintListener), org.eclipse.swt.widgets.Link#removeGestureListener(org.eclipse.swt.events.GestureListener), org.eclipse.swt.widgets.Link#removeControlListener(org.eclipse.swt.events.ControlListener), org.eclipse.swt.widgets.Link#removeDragDetectListener(org.eclipse.swt.events.DragDetectListener), org.eclipse.swt.widgets.Link#removeMouseTrackListener(org.eclipse.swt.events.MouseTrackListener), org.eclipse.swt.widgets.Link#removeMouseMoveListener(org.eclipse.swt.events.MouseMoveListener), org.eclipse.swt.widgets.Link#removeTraverseListener(org.eclipse.swt.events.TraverseListener), org.eclipse.swt.widgets.Link#removeMenuDetectListener(org.eclipse.swt.events.MenuDetectListener), org.eclipse.swt.widgets.Link#getMonitor(), org.eclipse.swt.widgets.Link#getEnabled(), org.eclipse.swt.widgets.Link#getVisible(), org.eclipse.swt.widgets.Link#getShell(), org.eclipse.swt.widgets.Link#setFocus(), org.eclipse.swt.widgets.Link#requestLayout(), org.eclipse.swt.widgets.Link#removeFocusListener(org.eclipse.swt.events.FocusListener), org.eclipse.swt.widgets.Link#removeKeyListener(org.eclipse.swt.events.KeyListener), org.eclipse.swt.widgets.Link#removeMouseListener(org.eclipse.swt.events.MouseListener), org.eclipse.swt.widgets.Link#removeMouseWheelListener(org.eclipse.swt.events.MouseWheelListener), org.eclipse.swt.widgets.Link#addHelpListener(org.eclipse.swt.events.HelpListener), org.eclipse.swt.widgets.Link#addControlListener(org.eclipse.swt.events.ControlListener), org.eclipse.swt.widgets.Link#addGestureListener(org.eclipse.swt.events.GestureListener), org.eclipse.swt.widgets.Link#addPaintListener(org.eclipse.swt.events.PaintListener), org.eclipse.swt.widgets.Link#addTouchListener(org.eclipse.swt.events.TouchListener), org.eclipse.swt.widgets.Link#dragDetect(org.eclipse.swt.widgets.Event), org.eclipse.swt.widgets.Link#dragDetect(org.eclipse.swt.events.MouseEvent), org.eclipse.swt.widgets.Link#getBackgroundImage(), org.eclipse.swt.widgets.Link#isFocusControl(), org.eclipse.swt.widgets.Link#forceFocus(), org.eclipse.swt.widgets.Link#getBorderWidth(), org.eclipse.swt.widgets.Link#getAccessible(), org.eclipse.swt.widgets.Link#getLayoutData(), org.eclipse.swt.widgets.Link#internal_new_GC(org.eclipse.swt.graphics.GCData), org.eclipse.swt.widgets.Link#getDragDetect(), org.eclipse.swt.widgets.Link#getMenu(), org.eclipse.swt.widgets.Link#getTouchEnabled(), org.eclipse.swt.widgets.Link#getTextDirection(), org.eclipse.swt.widgets.Link#moveBelow(org.eclipse.swt.widgets.Control), org.eclipse.swt.widgets.Link#moveAbove(org.eclipse.swt.widgets.Control), org.eclipse.swt.widgets.Link#redraw(int, int, int, int, boolean), org.eclipse.swt.widgets.Link#redraw(), org.eclipse.swt.widgets.Link#removeHelpListener(org.eclipse.swt.events.HelpListener), org.eclipse.swt.widgets.Link#setBackgroundImage(org.eclipse.swt.graphics.Image), org.eclipse.swt.widgets.Link#setCapture(boolean), org.eclipse.swt.widgets.Link#toControl(int, int), org.eclipse.swt.widgets.Link#toControl(org.eclipse.swt.graphics.Point), org.eclipse.swt.widgets.Link#setDragDetect(boolean), org.eclipse.swt.widgets.Link#setLayoutData(java.lang.Object), org.eclipse.swt.widgets.Link#toDisplay(org.eclipse.swt.graphics.Point), org.eclipse.swt.widgets.Link#toDisplay(int, int), org.eclipse.swt.widgets.Link#setRedraw(boolean), org.eclipse.swt.widgets.Link#setTextDirection(int), org.eclipse.swt.widgets.Link#setTouchEnabled(boolean), org.eclipse.swt.widgets.Link#pack(), org.eclipse.swt.widgets.Link#pack(boolean), org.eclipse.swt.widgets.Link#setLocation(org.eclipse.swt.graphics.Point), org.eclipse.swt.widgets.Link#setLocation(int, int), org.eclipse.swt.widgets.Link#toString(), org.eclipse.swt.widgets.Link#dispose(), org.eclipse.swt.widgets.Link#getListeners(int), org.eclipse.swt.widgets.Link#getStyle(), org.eclipse.swt.widgets.Link#reskin(int), org.eclipse.swt.widgets.Link#isDisposed(), org.eclipse.swt.widgets.Link#addListener(int, org.eclipse.swt.widgets.Listener), org.eclipse.swt.widgets.Link#removeDisposeListener(org.eclipse.swt.events.DisposeListener), org.eclipse.swt.widgets.Link#notifyListeners(int, org.eclipse.swt.widgets.Event), org.eclipse.swt.widgets.Link#isListening(int), org.eclipse.swt.widgets.Link#removeListener(int, org.eclipse.swt.widgets.Listener), org.eclipse.swt.widgets.Link#getDisplay(), org.eclipse.swt.widgets.Link#isAutoDirection(), org.eclipse.swt.widgets.Link#addDisposeListener(org.eclipse.swt.events.DisposeListener), org.eclipse.swt.widgets.Link#setData(java.lang.Object), org.eclipse.swt.widgets.Link#setData(java.lang.String, java.lang.Object), org.eclipse.swt.widgets.Link#getData(java.lang.String), org.eclipse.swt.widgets.Link#getData(), org.eclipse.swt.widgets.Link#wait(long, int), org.eclipse.swt.widgets.Link#wait(), org.eclipse.swt.widgets.Link#wait(long), org.eclipse.swt.widgets.Link#equals(java.lang.Object), org.eclipse.swt.widgets.Link#hashCode(), org.eclipse.swt.widgets.Link#getClass(), org.eclipse.swt.widgets.Link#notify(), org.eclipse.swt.widgets.Link#notifyAll(), org.eclipse.swt.widgets.Link#isAutoScalable() |
Possible values: "none", "fixed", "free"
Queries if all agents in a collection are true for a boolean closure.
a
- a collection of ReLogoAgentsclosure
- a boolean closureExecutes a set of commands for an agentset in random order.
a
- an agentsetaskBlock
- a set of commandsExecutes a set of commands for a collection of agents.
c
- a collection of agentsaskBlock
- a set of commandsExecutes a set of commands for a turtle.
t
- a turtleaskBlock
- a set of commandsExecutes a set of commands for a patch.
p
- a patchaskBlock
- a set of commandsExecutes a set of commands for a link.
l
- a linkaskBlock
- a set of commandsReturns two agents connected by link.
Removes the link.
Prints value with agent identifier to current file with a newline.
value
- any objectJoins together two ends of a link and ties the movements of the ends, except for headings.
Returns the color of a link. @ returns color of a link in the range [0, 140)
Returns the first turtle of a link.
Returns the second turtle of a link.
Returns the label color for a turtle or link. @ returns label color in the range [0, 140)
Returns the maximum x coordinate for all patches.
Returns the maximum y coordinate for all patches.
Returns the minimum x coordinate for all patches.
Returns the minimum y coordinate for all patches.
Link appears hidden.
Queries if caller is hidden.
Returns the link between two turtles.
oneEnd
- an integerotherEnd
- an integerReturns the link between two turtles.
oneEnd
- a turtleotherEnd
- a turtleReturns the heading of a link.
Returns the length of a link.
Returns an agentset consisting of a specified number of agents which have the greatest value when operated on by a set of commands.
number
- an integera
- a collectionclosure
- a set of commandsReturns the ReLogoAgent with the largest value when operated on by a set of commands.
a
- a collectionclosure
- a set of commandsReturns an agentset consisting of a specified number of agents which have the lowest value when operated on by a set of commands.
number
- an integera
- a collectionclosure
- a set of commandsReturns the ReLogoAgent with the smallest value when operated on by a set of commands.
a
- a collectionclosure
- a set of commandsThe agent that initiated the asking.
Stops a link executing within a command closure.
Returns an agentset minus the caller.
a
- an agentsetReturns the turtle opposite the asking turtle.
Returns the patch containing a point.
nX
- x coordinatenY
- y coordinateReturns an agentset containing all patches.
Returns a random x coordinate for patches.
Returns a random y coordinate for patches.
Returns a random x coordinate for turtles.
Returns a random y coordinate for turtles.
Interprets a string as commands then runs the commands.
string
- a stringInterprets a string as a command then returns the result.
string
- a stringReturns this turtle, patch, or link.
Sets the color of a link to the value color.
color
- a numberSets the first turtle of a link to end1.
end1
- a turtleSets the second turtle of a link to end2.
end2
- a turtleSets link visibility.
hidden
- boolean visibilitySets the label color for a link to labelColor.
labelColor
- a number in range [0, 140)Sets the agent that initiated the asking to the value o.
o
- an objectPrints value with agent identifier to the console.
value
- any objectMakes link visible.
Joins together two ends of a link and ties the movements of the ends.
This method provides a human-readable name for the agent.
Returns the turtle of the given number.
number
- a numberReturns an agentset containing all turtles.
Returns an agentset of turtles on a given patch.
p
- a patchReturns an agentset of turtles on the same patch as a turtle.
t
- a turtleReturns an agentset of turtles on the patches in a collection or on the patches that a collection of turtles are.
a
- a collectionUnties two ends of a link.
Returns the height of the world.
Returns the width of the world.