| Package | net.systemeD.halcyon.styleparser |
| Class | public class Style |
| Subclasses | InstructionStyle, PointStyle, ShapeStyle, ShieldStyle, TextStyle |
See also
| Property | Defined by | ||
|---|---|---|---|
| drawn : Boolean [read-only] Does this style require anything to be drawn? (To be overridden.)
| Style | ||
| edited : Boolean = false Is the style active (properties have been set)?
| Style | ||
| evals : Object Compiled SWFs for each eval.
| Style | ||
| interactive : Boolean = true Does this style permit mouse interaction?
(Some styling, such as P2's back-level yellow highlight for selected ways, should not respond
to mouse events.)
| Style | ||
| merged : Boolean = false Has this style had another style merged into it?
(When styles cascade, then we need to merge the first style with any subsequent styles that apply.)
| Style | ||
| properties : Array [read-only] Properties getter, to be overridden.
| Style | ||
| sublayer : Number = 5 The sublayer is the z-index property _within_ an OSM layer.
| Style | ||
| Method | Defined by | ||
|---|---|---|---|
|
deepCopy():*
Make an exact copy of an object.
| Style | ||
|
hasEvals():Boolean
Are there any eval functions defined?
| Style | ||
|
Merge two Style objects.
| Style | ||
|
runEvals(tags:Object):void
Run all evals for this Style over the supplied tags.
| Style | ||
|
setPropertyFromString(k:String, v:*):Boolean
Set a property, casting as correct type.
| Style | ||
|
toString():String
Summarise Style as String - for debugging.
| Style | ||
| drawn | property |
drawn:Boolean [read-only]Does this style require anything to be drawn? (To be overridden.)
Implementation public function get drawn():Boolean
| edited | property |
public var edited:Boolean = falseIs the style active (properties have been set)?
| evals | property |
public var evals:ObjectCompiled SWFs for each eval. We keep it here, not in the property itself, so that we can retain typing for each property.
| interactive | property |
public var interactive:Boolean = trueDoes this style permit mouse interaction? (Some styling, such as P2's back-level yellow highlight for selected ways, should not respond to mouse events.)
| merged | property |
public var merged:Boolean = falseHas this style had another style merged into it? (When styles cascade, then we need to merge the first style with any subsequent styles that apply.)
| properties | property |
properties:Array [read-only]Properties getter, to be overridden.
Implementation public function get properties():Array
| sublayer | property |
public var sublayer:Number = 5The sublayer is the z-index property _within_ an OSM layer. It enables (for example) trunk roads to be rendered above primary roads within that OSM layer, and so on. "OSM layer 1 / sublayer 5" will render above "OSM layer 1 / sublayer 4", but below "OSM layer 2 / sublayer 4".
| deepCopy | () | method |
public function deepCopy():*Make an exact copy of an object. Used when merging cascading styles. (FIXME: this needs some benchmarking - it may be quicker to simply iterate over .properties, copying each one.
Returns* |
| hasEvals | () | method |
public function hasEvals():BooleanAre there any eval functions defined?
ReturnsBoolean |
| mergeWith | () | method |
public function mergeWith(additional:Style):voidMerge two Style objects.
Parametersadditional:Style |
| runEvals | () | method |
public function runEvals(tags:Object):voidRun all evals for this Style over the supplied tags. If, for example, the stylesheet contains width=eval('_width+2'), then this will set Style.width to 7.
Parameterstags:Object |
| setPropertyFromString | () | method |
public function setPropertyFromString(k:String, v:*):BooleanSet a property, casting as correct type.
Parametersk:String |
|
v:* |
Boolean |
| toString | () | method |
public function toString():StringSummarise Style as String - for debugging.
ReturnsString |