|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EditionContext
information about the theme in edition, the user input, etc, ...
Method Summary | |
---|---|
void |
addEditionContextListener(EditionContextListener listener)
Removes a listener of the edition context events |
boolean |
canRedoExtent()
|
boolean |
canUndoExtent()
|
void |
closeActiveTheme()
Closes the currently opened theme |
void |
closeAll()
Closes all the themes |
void |
closeTheme(int index)
Closes the specified theme |
void |
dataChanged()
Invoked in order to the adapter to redraw the spatial data |
Theme |
getActiveTheme()
Gets the active theme. |
int |
getActiveThemeIndex()
Gets the active theme index |
java.util.ArrayList<Handler> |
getCurrentHandlers()
Gets the currently shown handlers |
com.hardcode.gdbms.engine.data.SpatialDataSource |
getDrawingDataSource()
Gets a DataSource used to draw over the image. |
java.awt.Image |
getDrawnImage()
Gets the last drawn image |
Automaton |
getEditionTool()
Gets the current edition tool |
java.awt.geom.Rectangle2D |
getExtent()
Gets the extent where the edition takes place in |
int |
getLastMouseX()
Gets the last position of the mouse |
int |
getLastMouseY()
Gets the las position of the mouse |
java.awt.geom.Point2D |
getLastRealMousePosition()
Gets the last position of the mouse in real world coordinates. |
int |
getMouseModifiers()
Gets the mouse modifiers of a transition performed by the used |
Theme |
getTheme(int index)
Gets the index-th Theme |
int |
getThemeCount()
Gets the number of themes in the edition context |
double |
getTolerance()
Gets the mouse tolerance in realworld units |
int |
getUITolerance()
Gets the tolerance in image units |
double[] |
getValues()
Gets the input of the user. |
boolean |
isSnapping()
Gets the activation status of the snapping feature of the edition context |
void |
moveThemeTo(int from,
int to)
Moves the theme in the 'from' position to the 'to' position shifting all the themes which position is greater or equal to 'to' |
void |
newTheme(com.hardcode.gdbms.engine.data.db.DBSpatialSource dbSource,
java.lang.String driverName,
com.hardcode.gdbms.engine.data.metadata.SpatialDriverMetadata sm)
Creates a new database table for edition and adds it to the list of themes |
void |
newTheme(java.io.File file,
java.lang.String driverName,
com.hardcode.gdbms.engine.data.metadata.SpatialDriverMetadata sm)
Creates a new File for edition and adds it to the list of themes |
void |
openTheme(com.hardcode.gdbms.engine.data.db.DBSpatialSource dbDef,
java.lang.String driverName)
Opens a database table for edition and adds it to the list of themes |
void |
openTheme(java.io.File file,
java.lang.String driverName)
Opens a file for edition and adds it to the list of themes |
void |
redoExtent()
Redoes the last undone extent change |
void |
remark(int index)
Remarks visually a selected record |
void |
removeEditionContextListener(EditionContextListener listener)
Removes a listener of the edition context events |
void |
removeSelected()
Removes the selected geometries |
void |
saveActiveTheme()
Saves the contents of the theme currently in edition |
void |
saveTheme(int index)
Saves the contents of the specified theme |
void |
saveThemeAs(com.hardcode.gdbms.engine.data.db.DBSpatialSource dbss,
java.lang.String driverName)
Saves the contents of the active theme in the specified database table. |
void |
saveThemeAs(java.io.File file,
java.lang.String driverName)
Saves the contents of the active theme in the specified file with the specified driver. |
void |
setActiveTheme(int index)
Sets the active theme |
void |
setEditionTool(Automaton tool)
Sets the current edition tool |
void |
setExtent(java.awt.geom.Rectangle2D newExtent)
Sets the extent where the edition takes place in |
void |
setMouseModifiers(int modifiers)
Sets the mouse modifiers of the next transition |
void |
setSnapping(boolean snapping)
activates/deactivates the snapping feature of the edition context |
void |
setUITolerance(int tolerance)
Sets the mouse tolerance in image units |
void |
setValues(double[] values)
Sets the user input data |
java.awt.Point |
toImagePoint(double x,
double y)
Transforms a real world point into a image one |
java.awt.geom.Point2D |
toRealPoint(int x,
int y)
Transforms a image point into a real word one |
void |
transition(java.lang.String code)
Makes a transition on the currently selected tool |
void |
undoExtent()
Undoes the last extent change |
Method Detail |
---|
Theme getTheme(int index)
int getThemeCount()
int getActiveThemeIndex()
Theme getActiveTheme()
double[] getValues()
void setValues(double[] values)
values
- double getTolerance()
void setUITolerance(int tolerance)
tolerance
- void transition(java.lang.String code) throws NoSuchTransitionException, TransitionException
code
- transition code
NoSuchTransitionException
- If such transition doesn't exists
TransitionException
- If the transition execution failedvoid setEditionTool(Automaton tool) throws TransitionException
tool
-
TransitionException
- If the initializarion of the tool failsAutomaton getEditionTool()
void setExtent(java.awt.geom.Rectangle2D newExtent)
newExtent
- java.awt.geom.Rectangle2D getExtent()
boolean canUndoExtent()
boolean canRedoExtent()
void undoExtent()
void redoExtent()
java.awt.Image getDrawnImage()
java.awt.Point toImagePoint(double x, double y)
x
- y
-
java.awt.geom.Point2D toRealPoint(int x, int y)
x
- y
-
int getLastMouseX()
int getLastMouseY()
java.awt.geom.Point2D getLastRealMousePosition()
int getUITolerance()
java.util.ArrayList<Handler> getCurrentHandlers()
com.hardcode.gdbms.engine.data.SpatialDataSource getDrawingDataSource()
void dataChanged()
void newTheme(com.hardcode.gdbms.engine.data.db.DBSpatialSource dbSource, java.lang.String driverName, com.hardcode.gdbms.engine.data.metadata.SpatialDriverMetadata sm) throws com.hardcode.gdbms.engine.data.driver.DriverException, ThemeCreationException
dbSource
- information about the table to createdriverName
- Name of the driver used to create the tablesm
- metadata of the table
DriverExceptionT
ThemeCreationException
- hemeCreationException
com.hardcode.gdbms.engine.data.driver.DriverException
void newTheme(java.io.File file, java.lang.String driverName, com.hardcode.gdbms.engine.data.metadata.SpatialDriverMetadata sm) throws ThemeCreationException, com.hardcode.gdbms.engine.data.driver.DriverException
file
- new file to editdriverName
- Name of the driver used to read file contents
ThemeCreationException
- If cannot create the theme
com.hardcode.gdbms.engine.data.driver.DriverException
- If cannot put the theme on editable modevoid openTheme(java.io.File file, java.lang.String driverName) throws ThemeCreationException, com.hardcode.gdbms.engine.data.driver.DriverException
file
- file to opendriver
- Name of the driver used to read file contents
ThemeCreationException
- If cannot create the theme
com.hardcode.gdbms.engine.data.driver.DriverException
- If cannot put the theme on editable modevoid openTheme(com.hardcode.gdbms.engine.data.db.DBSpatialSource dbDef, java.lang.String driverName) throws ThemeCreationException, com.hardcode.gdbms.engine.data.driver.DriverException
dbDef
- data structure with th information to access the databasedriverName
- Name of the driver used to read file contents
ThemeCreationException
- If cannot create the theme
com.hardcode.gdbms.engine.data.driver.DriverException
- If cannot put the theme on editable modevoid saveActiveTheme() throws com.hardcode.gdbms.engine.data.driver.DriverException, com.hardcode.gdbms.engine.data.FreeingResourcesException
com.hardcode.gdbms.engine.data.driver.DriverException
- if the operation fails
com.hardcode.gdbms.engine.data.FreeingResourcesException
- If the operations succeeds but resources cannot be freedvoid saveTheme(int index) throws com.hardcode.gdbms.engine.data.driver.DriverException, com.hardcode.gdbms.engine.data.FreeingResourcesException
com.hardcode.gdbms.engine.data.driver.DriverException
- if the operation fails
com.hardcode.gdbms.engine.data.FreeingResourcesException
- If the operations succeeds but resources cannot be freedvoid saveThemeAs(java.io.File file, java.lang.String driverName) throws com.hardcode.gdbms.engine.data.driver.DriverException, com.hardcode.gdbms.engine.data.DataSourceCreationException, ThemeCreationException
file
- file to save the contentsdriver
- Name of the driver used to access the data
com.hardcode.gdbms.engine.data.driver.DriverException
- If the operation fails
ThemeCreationException
- If cannot create a new theme
TransitionException
- If the tool reinitialization fails
com.hardcode.gdbms.engine.data.DataSourceCreationException
void saveThemeAs(com.hardcode.gdbms.engine.data.db.DBSpatialSource dbss, java.lang.String driverName) throws com.hardcode.gdbms.engine.data.driver.DriverException, com.hardcode.gdbms.engine.data.DataSourceCreationException, ThemeCreationException
dbss
- Table where to save the contentsdriverName
- Name of the driver used to access the data
com.hardcode.gdbms.engine.data.driver.DriverException
- If the operation fails
ThemeCreationException
- If cannot create a new theme
TransitionException
- If the tool reinitialization fails
com.hardcode.gdbms.engine.data.DataSourceCreationException
void closeTheme(int index) throws com.hardcode.gdbms.engine.data.driver.DriverException
index
-
com.hardcode.gdbms.engine.data.driver.DriverException
void closeAll() throws com.hardcode.gdbms.engine.data.driver.DriverException
com.hardcode.gdbms.engine.data.driver.DriverException
void closeActiveTheme() throws com.hardcode.gdbms.engine.data.driver.DriverException
com.hardcode.gdbms.engine.data.driver.DriverException
- If the rollBack operation in the current theme failsvoid removeSelected() throws com.hardcode.gdbms.engine.data.driver.DriverException
com.hardcode.gdbms.engine.data.driver.DriverException
- If the operation failsint getMouseModifiers()
void setMouseModifiers(int modifiers)
void addEditionContextListener(EditionContextListener listener)
listener
- void removeEditionContextListener(EditionContextListener listener)
listener
- void remark(int index)
index
- index in the getSelection arrayboolean isSnapping()
void setSnapping(boolean snapping)
snapping
- void setActiveTheme(int index) throws com.hardcode.gdbms.engine.data.driver.DriverException
index
-
com.hardcode.gdbms.engine.data.driver.DriverException
void moveThemeTo(int from, int to)
from
- to
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |