org.openjump.core.ui.plugin.mousemenu.category
Class CategoryMover

java.lang.Object
  extended by org.openjump.core.ui.plugin.mousemenu.category.CategoryMover

public class CategoryMover
extends java.lang.Object

Provides methods to move a category including the layers in it within the LayerNamePanel.

Author:
Ole Rahn, FH Osnabrück - University of Applied Sciences Osnabrück, Project: PIROL (2005), Subproject: Daten- und Wissensmanagement

Field Summary
protected  PlugInContext context
           
 
Constructor Summary
CategoryMover(PlugInContext context)
           
 
Method Summary
protected  Category getCategory(java.lang.String name)
          Gets category with spcified name, if exists.
 void moveCategoryOneDown(Category cat)
          Moves the given category to the next lower position in the LayerNamePanel
 void moveCategoryOneUp(Category cat)
          Moves the given category to the next higher position in the LayerNamePanel
 void moveCategoryToBottom(Category cat)
          Moves the given category to the bottom position in the LayerNamePanel
 void moveCategoryToPosition(Category cat, int pos)
          Moves the given category to the given position in the LayerNamePanel
 void moveCategoryToPosition(java.lang.String name, int pos)
          Moves the category with the given name to the given position in the LayerNamePanel
 void moveCategoryToTop(Category cat)
          Moves the given category to the top position in the LayerNamePanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected PlugInContext context
Constructor Detail

CategoryMover

public CategoryMover(PlugInContext context)
Method Detail

getCategory

protected Category getCategory(java.lang.String name)
Gets category with spcified name, if exists.

Parameters:
name -
Returns:
category or null

moveCategoryToPosition

public void moveCategoryToPosition(java.lang.String name,
                                   int pos)
Moves the category with the given name to the given position in the LayerNamePanel

Parameters:
name - name of the category
pos - desired position

moveCategoryToPosition

public void moveCategoryToPosition(Category cat,
                                   int pos)
Moves the given category to the given position in the LayerNamePanel

Parameters:
cat - category to move
pos - desired position

moveCategoryToTop

public void moveCategoryToTop(Category cat)
Moves the given category to the top position in the LayerNamePanel

Parameters:
cat - category to move

moveCategoryToBottom

public void moveCategoryToBottom(Category cat)
Moves the given category to the bottom position in the LayerNamePanel

Parameters:
cat - category to move

moveCategoryOneUp

public void moveCategoryOneUp(Category cat)
Moves the given category to the next higher position in the LayerNamePanel

Parameters:
cat - category to move

moveCategoryOneDown

public void moveCategoryOneDown(Category cat)
Moves the given category to the next lower position in the LayerNamePanel

Parameters:
cat - category to move