org.formaria.svg
Class SvgElementState

java.lang.Object
  extended by org.formaria.svg.SvgElementState

public class SvgElementState
extends java.lang.Object

Manages the visibility of a svg element

Copyright (c) Formaria 2008, see license.txt for more details


Field Summary
 SVGElement element
           
 java.lang.String elementName
           
 boolean hidden
           
 
Constructor Summary
SvgElementState()
          Creates a new instance of SvgElementState
 
Method Summary
 void setup(SVGDiagram diagram, java.lang.String id)
          Setup the svg element wrapper
 boolean setVisible(boolean visible)
          Change the visibility of the element if the requested visibility differs from the current state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

public SVGElement element

hidden

public boolean hidden

elementName

public java.lang.String elementName
Constructor Detail

SvgElementState

public SvgElementState()
Creates a new instance of SvgElementState

Method Detail

setup

public void setup(SVGDiagram diagram,
                  java.lang.String id)
Setup the svg element wrapper

Parameters:
diagram - the svg diagram that owns the element
id - the id of the element/layer

setVisible

public boolean setVisible(boolean visible)
Change the visibility of the element if the requested visibility differs from the current state

Parameters:
visible - true to make the element visible
Returns:
true if the visiblity state has changed