public class

NewObservationUsingConceptNameButton

extends FancyButton
implements Transferable DragGestureListener DragSourceListener IPopup
java.lang.Object
   ↳ java.awt.Component
     ↳ java.awt.Container
       ↳ javax.swing.JComponent
         ↳ javax.swing.AbstractButton
           ↳ javax.swing.JButton
             ↳ org.mbari.swing.JFancyButton
               ↳ vars.shared.ui.FancyButton
                 ↳ vars.annotation.ui.cbpanel.NewObservationUsingConceptNameButton

Class Overview

Creates a new Observation and changes its fromConcept to one specified in the constructor. This implements various drag and drop interfaces so that the button can be moved around in a tabbed panel, allowing users to reorganize thier buttons.

Summary

Constants
DataFlavor BUTTON_FLAVOR
String DISPATCHER_KEY_DRAG_LOCK
[Expand]
Inherited Constants
From class javax.swing.AbstractButton
From class javax.swing.JComponent
From class java.awt.Component
From interface java.awt.image.ImageObserver
From interface javax.swing.SwingConstants
[Expand]
Inherited Fields
From class javax.swing.AbstractButton
From class javax.swing.JComponent
Public Constructors
NewObservationUsingConceptNameButton(String conceptName, ToolBelt toolbelt)
Constructor for the NewObservationUsingConceptNameButton object
Public Methods
void dragDropEnd(DragSourceDropEvent dsde)
Drag and drop methods
void dragEnter(DragSourceDragEvent dsde)
Drag and drop methods
void dragExit(DragSourceEvent dse)
Drag and drop methods
void dragGestureRecognized(DragGestureEvent dragGesture)
Drag and drop methods
void dragOver(DragSourceDragEvent dsde)
Drage and drop method
void dropActionChanged(DragSourceDragEvent dsde)
Description of the Method
String getConceptName()
Gets the conceptName attribute of the NewObservationUsingConceptNameButton object
JPopupMenu getPopupMenu()
Generate a popup menu with a menu item that locates the conceptName in the Knowledgebase tree.
synchronized Object getTransferData(DataFlavor flavor)
Gets the transferData attribute of the NewObservationUsingConceptNameButton object
DataFlavor[] getTransferDataFlavors()
Gets the transferDataFlavors attribute of the NewObservationUsingConceptNameButton object
boolean isDataFlavorSupported(DataFlavor flavor)
Gets the dataFlavorSupported attribute of the NewObservationUsingConceptNameButton object
[Expand]
Inherited Methods
From class javax.swing.JButton
From class javax.swing.AbstractButton
From class javax.swing.JComponent
From class java.awt.Container
From class java.awt.Component
From class java.lang.Object
From interface java.awt.ItemSelectable
From interface java.awt.MenuContainer
From interface java.awt.datatransfer.Transferable
From interface java.awt.dnd.DragGestureListener
From interface java.awt.dnd.DragSourceListener
From interface java.awt.image.ImageObserver
From interface javax.accessibility.Accessible
From interface org.mbari.swing.IPopup

Constants

public static final DataFlavor BUTTON_FLAVOR

public static final String DISPATCHER_KEY_DRAG_LOCK

Constant Value: "NewObservationUsingConceptNameButton.DRAG_LOCK"

Public Constructors

public NewObservationUsingConceptNameButton (String conceptName, ToolBelt toolbelt)

Constructor for the NewObservationUsingConceptNameButton object

Parameters
conceptName New Observations will be created using this conceptName.

Public Methods

public void dragDropEnd (DragSourceDropEvent dsde)

Drag and drop methods

Parameters
dsde Description of the Parameter

public void dragEnter (DragSourceDragEvent dsde)

Drag and drop methods

Parameters
dsde Description of the Parameter

public void dragExit (DragSourceEvent dse)

Drag and drop methods

Parameters
dse Description of the Parameter

public void dragGestureRecognized (DragGestureEvent dragGesture)

Drag and drop methods

Parameters
dragGesture A dragGestureEvent

public void dragOver (DragSourceDragEvent dsde)

Drage and drop method

Parameters
dsde Description of the Parameter

public void dropActionChanged (DragSourceDragEvent dsde)

Description of the Method

Parameters
dsde Description of the Parameter

public String getConceptName ()

Gets the conceptName attribute of the NewObservationUsingConceptNameButton object

Returns
  • The conceptName value used to create new Observations

public JPopupMenu getPopupMenu ()

Generate a popup menu with a menu item that locates the conceptName in the Knowledgebase tree. Access to this popup menu is needed so that the Panel that these buttons gets dropped onto can add a delete item.

Returns
  • The popupMenu value

public synchronized Object getTransferData (DataFlavor flavor)

Gets the transferData attribute of the NewObservationUsingConceptNameButton object

Parameters
flavor Description of the Parameter
Returns
  • The transferData value
Throws
UnsupportedFlavorException Description of the Exception

public DataFlavor[] getTransferDataFlavors ()

Gets the transferDataFlavors attribute of the NewObservationUsingConceptNameButton object

Returns
  • The transferDataFlavors value

public boolean isDataFlavorSupported (DataFlavor flavor)

Gets the dataFlavorSupported attribute of the NewObservationUsingConceptNameButton object

Parameters
flavor Description of the Parameter
Returns
  • The dataFlavorSupported value