|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.mit.sketch.danclock.model.Clock
public class Clock
Represents a sketch of a clock, consisting of an outer face, hands, digits, and possibly a center piece. (Some people draw a ring in the middle to connect the hands.) Clocks additionally have unclassified strokes, which either haven't yet been grouped using Clock's classification methods, or need to be grouped manually using the GUI. Note that some recognition steps in Clock depend on other components already being recognized, whether by Clock's automatic methods or the GUI. Digits, for example, depend on everything else already being grouped, such that the only unclassified strokes are digit strokes. The dependency order is {face (depends on nothing), center, hands, digits}.
| Constructor Summary | |
|---|---|
Clock(java.util.Collection<Stroke> strokes)
Constructs an unclassified clock from a set of strokes. |
|
Clock(FaceSymbol face,
CenterSymbol center,
java.util.Set<DigitSymbol> digits,
java.util.Set<HandSymbol> hands,
java.util.Set<Stroke> unclassifiedStrokes)
Constructs a classified clock from the given components. |
|
| Method Summary | |
|---|---|
void |
classifyAll()
|
boolean |
classifyClockCenter()
Attepts to group any strokes drawn as a center piece connecting the clock hands. |
boolean |
classifyClockFace()
Attempts to find the circular outer clock face of this clock. |
boolean |
classifyDigits()
Attepts to find the digits. |
boolean |
classifyHands()
Attempts to find the hour and minute hands. |
BoundingBox |
getBounds()
|
CenterSymbol |
getCenter()
|
java.util.Set<Stroke> |
getClassifiedStrokes()
|
java.util.Set<DigitSymbol> |
getDigits()
|
FaceSymbol |
getFace()
|
java.util.Set<HandSymbol> |
getHands()
|
java.util.SortedSet<Stroke> |
getStrokes()
|
java.util.Set<Stroke> |
getUnclassifiedStrokes()
|
boolean |
hasClockCenter()
|
boolean |
hasClockFace()
|
boolean |
hasDigits()
|
boolean |
hasStandardDigits()
|
boolean |
hasStandardHands()
|
void |
setClockCenter(CenterSymbol center)
|
void |
setClockFace(FaceSymbol face)
|
void |
setDigits(java.util.Collection<DigitSymbol> digitSymbol)
|
void |
setHands(java.util.Set<HandSymbol> hands)
|
void |
unclassifyAll()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Clock(java.util.Collection<Stroke> strokes)
strokes - the constituent strokes
public Clock(FaceSymbol face,
CenterSymbol center,
java.util.Set<DigitSymbol> digits,
java.util.Set<HandSymbol> hands,
java.util.Set<Stroke> unclassifiedStrokes)
| Method Detail |
|---|
public boolean classifyClockFace()
public boolean classifyClockCenter()
public boolean classifyHands()
public boolean classifyDigits()
public void classifyAll()
public void unclassifyAll()
public void setClockFace(FaceSymbol face)
public void setClockCenter(CenterSymbol center)
public void setHands(java.util.Set<HandSymbol> hands)
public void setDigits(java.util.Collection<DigitSymbol> digitSymbol)
public boolean hasClockFace()
public boolean hasClockCenter()
public boolean hasDigits()
public boolean hasStandardDigits()
public boolean hasStandardHands()
public java.util.SortedSet<Stroke> getStrokes()
public java.util.Set<Stroke> getClassifiedStrokes()
public java.util.Set<Stroke> getUnclassifiedStrokes()
public FaceSymbol getFace()
public CenterSymbol getCenter()
public java.util.Set<DigitSymbol> getDigits()
public java.util.Set<HandSymbol> getHands()
public BoundingBox getBounds()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||