Class Task

java.lang.Object
com.vividsolutions.jump.workbench.model.Task
All Implemented Interfaces:
LayerManagerProxy

public class Task extends Object implements LayerManagerProxy
Whatever the user needs to do a particular task. Currently a thin wrapper around a LayerManager.
  • Field Details

    • PROJECT_FILE_KEY

      public static final String PROJECT_FILE_KEY
      Project File property, Used to determine whether a project file has been moved away from its original location
      See Also:
    • PROJECT_UNIT_KEY

      public static final String PROJECT_UNIT_KEY
      Project Unit property, Used to determine project unit (extract from SRS: metre, foot, etc)
      See Also:
    • PROJECT_SRS_KEY

      public static final String PROJECT_SRS_KEY
      Project SRS property, Used to determine spatial reference system of a project (saved as SRID: 32632, 4326, etc)
      See Also:
    • PROJECT_COMMENT_KEY

      public static final String PROJECT_COMMENT_KEY
      Project Information property, Used to determine extra info as string text
      See Also:
    • PROJECT_TIME_KEY

      public static final String PROJECT_TIME_KEY
      Project Time property, Used to determine last modification time of a project
      See Also:
  • Constructor Details

    • Task

      public Task()
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
    • add

      public void add(Task.NameListener nameListener)
    • getProjectFile

      public File getProjectFile()
    • setProjectFile

      public void setProjectFile(File projectFile)
    • getLayerManager

      public LayerManager getLayerManager()
      Specified by:
      getLayerManager in interface LayerManagerProxy
    • getCategories

      public Collection<Category> getCategories()
    • addCategory

      public void addCategory(Category category)
      Called by Java2XML
    • setProperty

      public void setProperty(QName name, Object value)
      Set the value for the named property.
      Parameters:
      name - The name of the property.
      value - The value for the property.
    • getProperty

      public <T> T getProperty(QName name)

      Get the value for the named property casting it to the return value.

      Instead of:

      Integer i = (Integer)task.getProperty(...)
      

      You can use the following:

      Integer i = task.getProperty(...)
      
      Parameters:
      name - The name of the property.
      Returns:
      value The value for the property.
    • getProperty

      public <T> T getProperty(QName name, Object defaultValue)
      convenience method for getProperty(QName) that returns a default value in case the named property is not defined
      Parameters:
      name - qualified name of the Task property
      defaultValue - default value of the Task property
      Returns:
      the property of type T having this name
    • getProperties

      public Map<QName,Object> getProperties()
      Get all the task properties.
      Returns:
      The task properties.
    • setProperties

      public void setProperties(Map<QName,Object> properties)
      Set all the task properties.
      Parameters:
      properties - The task properties.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTaskWindowLocation

      public Point getTaskWindowLocation()
    • getTaskWindowLocationX

      public int getTaskWindowLocationX()
    • getTaskWindowLocationY

      public int getTaskWindowLocationY()
    • setTaskWindowLocation

      public void setTaskWindowLocation(Point taskWindowLocation)
    • setTaskWindowLocationX

      public void setTaskWindowLocationX(String x)
    • setTaskWindowLocationY

      public void setTaskWindowLocationY(String y)
    • getTaskWindowSize

      public Dimension getTaskWindowSize()
    • getTaskWindowSizeWidth

      public int getTaskWindowSizeWidth()
    • getTaskWindowSizeHeight

      public int getTaskWindowSizeHeight()
    • setTaskWindowSize

      public void setTaskWindowSize(Dimension taskWindowSize)
    • setTaskWindowSizeWidth

      public void setTaskWindowSizeWidth(String width)
    • setTaskWindowSizeHeight

      public void setTaskWindowSizeHeight(String height)
    • getMaximized

      public boolean getMaximized()
    • setMaximized

      public void setMaximized(boolean isMaximized)
    • getSavedViewEnvelope

      public org.locationtech.jts.geom.Envelope getSavedViewEnvelope()
    • getTaskWindowZoomLeft

      public double getTaskWindowZoomLeft()
    • getTaskWindowZoomRight

      public double getTaskWindowZoomRight()
    • getTaskWindowZoomBottom

      public double getTaskWindowZoomBottom()
    • getTaskWindowZoomTop

      public double getTaskWindowZoomTop()
    • setSavedViewEnvelope

      public void setSavedViewEnvelope(org.locationtech.jts.geom.Envelope savedViewEnvelope)
    • setTaskWindowZoomLeft

      public void setTaskWindowZoomLeft(String left)
    • setTaskWindowZoomRight

      public void setTaskWindowZoomRight(String right)
    • setTaskWindowZoomBottom

      public void setTaskWindowZoomBottom(String bottom)
    • setTaskWindowZoomTop

      public void setTaskWindowZoomTop(String top)
      This method must be called after all three previous have been done. Java2XML does this. This is necessary because all parameters must be known before an Envelope can be created (unlike Point and Dimension).
      Parameters:
      top -