gate.gui
Class CustomAnnotationEditDialog
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Dialog
|
+--javax.swing.JDialog
|
+--gate.gui.CustomAnnotationEditDialog
- All Implemented Interfaces:
- Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
- public class CustomAnnotationEditDialog
- extends JDialog
This class visually adds/edits features and annot type of an annotation
It does this without using an AnnotationSchema
.
The user can manipulate annotation and features at his own will.
Is his responsability.Although for annotation that have a schema present
into the system, this class will not be
used.AnnotationEditDialog
is highly prioritar in this case.
- See Also:
- Serialized Form
Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, state, warningString, weakThis, windowListener, windowSerializedDataVersion |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Method Summary |
private void |
doCancel()
This method is called when the user press the CANCEL button |
private void |
doOk()
This method is called when the user press the OK button |
String |
getAnnotType()
Returns annot type edited with this tool |
FeatureMap |
getFeatures()
Returns the features edited with this tool |
protected void |
initGuiComponents()
Init GUI components with values taken from local data |
protected void |
initListeners()
Init all the listeners |
protected void |
initLocalData()
Init local data |
int |
show(Annotation anAnnot)
This method displays the AnnotationEditDialog in creating mode
If one wants to create a new annotation then show() must be called with
null as a param. |
Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, createRootPaneException, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Dialog |
, addNotify, conditionalShow, constructComponentName, dispose, disposeImpl, getTitle, hide, hideAndDisposeHandler, initIDs, interruptBlocking, isModal, isResizable, setModal, setResizable, setTitle, show |
Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, eventEnabled, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postProcessKeyEvent, postWindowEvent, preProcessKeyEvent, processEvent, readObject, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, toBack, toFront, transferFocus, writeObject |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
cancelAnnotType
private String cancelAnnotType
cancelAnnotFeatureMap
private FeatureMap cancelAnnotFeatureMap
annot
private Annotation annot
data
private CustomAnnotationEditDialog.MyCustomFeatureBearer data
annotationSchemaSet
private Set annotationSchemaSet
buttonPressed
int buttonPressed
annotTypeLabel
JLabel annotTypeLabel
annotTypeTextField
JTextField annotTypeTextField
featuresLabel
JLabel featuresLabel
featuresEditor
FeaturesEditor featuresEditor
okButton
JButton okButton
cancelButton
JButton cancelButton
CustomAnnotationEditDialog
public CustomAnnotationEditDialog(Frame aFrame,
boolean aModal,
Set anAnnotationSchemaSet)
- Constructs a CustomAnnotationEditDialog
- Parameters:
aFram
- the parent frame of this dialog. It can be null.aModal
- wheter or not this dialog is modal.anAnnotationSchemaSet
- is used to veryfy the type of the annotation
being eddited. If the annotation has an AnnotationSchema then this
annotation will not be eddited by this object.
CustomAnnotationEditDialog
public CustomAnnotationEditDialog(Set anAnnotationSchemaSet)
- Constructs a CustomAnnotationEditDialog.The parent frame is null and the
dialog is modal.
- Parameters:
anAnnotationSchemaSet
- is used to veryfy the type of the annotation
being eddited. If the annotation has an AnnotationSchema then this
annotation will not be eddited by this object.
initLocalData
protected void initLocalData()
- Init local data
initGuiComponents
protected void initGuiComponents()
- Init GUI components with values taken from local data
initListeners
protected void initListeners()
- Init all the listeners
getAnnotType
public String getAnnotType()
- Returns annot type edited with this tool
getFeatures
public FeatureMap getFeatures()
- Returns the features edited with this tool
doOk
private void doOk()
- This method is called when the user press the OK button
doCancel
private void doCancel()
- This method is called when the user press the CANCEL button
show
public int show(Annotation anAnnot)
- This method displays the AnnotationEditDialog in creating mode
If one wants to create a new annotation then show() must be called with
null as a param.
- Parameters:
anAnnot
- is the annotation that one wants to edit. If is null
then an annotation will be created.- Returns:
- JFileChooser.CANCEL_OPTION or JFileChooser.APPROVE_OPTION
depending on what one choosed.