| |
|
| javax.swing.JButton org.netbeans.modules.soa.mapper.basicmapper.util.DragableLabel
All known Subclasses: org.netbeans.modules.soa.mapper.basicmapper.palette.BasicViewItem,
DragableLabel | public class DragableLabel extends JButton implements DragGestureListener,Transferable(Code) | |
Title: DragableLabel
Description: DragableLabel provide a JLabel with a drag guesture
listener.
author: Un Seng Leong |
Constructor Summary | |
public | DragableLabel() Creates a DragableJLabel instance with no image and with an empty string
for the title. | public | DragableLabel(Icon image) Creates a DragableJLabel instance with the specified image. | public | DragableLabel(Icon image, int horizontalAlignment) Creates a DragableJLabel instance with the specified image and horizontal
alignment. | public | DragableLabel(String text) Creates a DragableJLabel instance with the specified text. | public | DragableLabel(String text, Icon icon, int horizontalAlignment) Creates a DragableJLabel instance with the specified text, image, and
horizontal alignment. | public | DragableLabel(String text, int horizontalAlignment) Creates a DragableJLabel instance with the specified text and horizontal
alignment. |
DEFAULT_FLAVORS | final protected static DataFlavor DEFAULT_FLAVORS(Code) | | The default data flavor of this class.
|
dataFlavorMap | protected Map dataFlavorMap(Code) | | data flavor and transfer object storage
|
mDefaultData | protected Object mDefaultData(Code) | | The default transfer data. Default reference to this object instance.
|
mDragCursor | protected Cursor mDragCursor(Code) | | The cursor of this drag operation. Default to copy drop cursor.
|
mIsDraggable | protected boolean mIsDraggable(Code) | | Is this label draggable.
|
DragableLabel | public DragableLabel()(Code) | | Creates a DragableJLabel instance with no image and with an empty string
for the title.
|
DragableLabel | public DragableLabel(Icon image)(Code) | | Creates a DragableJLabel instance with the specified image.
Parameters: image - the image of this label |
DragableLabel | public DragableLabel(Icon image, int horizontalAlignment)(Code) | | Creates a DragableJLabel instance with the specified image and horizontal
alignment.
Parameters: image - the image of this label Parameters: horizontalAlignment - the horizontal aligmenet |
DragableLabel | public DragableLabel(String text)(Code) | | Creates a DragableJLabel instance with the specified text.
Parameters: text - the text of this label. |
DragableLabel | public DragableLabel(String text, Icon icon, int horizontalAlignment)(Code) | | Creates a DragableJLabel instance with the specified text, image, and
horizontal alignment.
Parameters: text - the text of this label Parameters: icon - the icon of this label. Parameters: horizontalAlignment - the horizontal aligment |
DragableLabel | public DragableLabel(String text, int horizontalAlignment)(Code) | | Creates a DragableJLabel instance with the specified text and horizontal
alignment.
Parameters: text - the text of this label Parameters: horizontalAlignment - the horizontal aligment |
addDataFlavor | public void addDataFlavor(DataFlavor flavor, Object transferData)(Code) | | Add a data flavor for this drag action.
Parameters: flavor - the dataflavor of this drag action. Parameters: transferData - the object return by this dataflavor. |
addDragSourceListener | public void addDragSourceListener(DragSourceListener listener)(Code) | | Add a drag source listener for this drag operation.
Parameters: listener - the listener to be added |
dragDropEnd | public void dragDropEnd(DragSourceDropEvent event)(Code) | | DOCUMENT ME!
Parameters: event - Description of the Parameter |
dragEnter | public void dragEnter(DragSourceDragEvent event)(Code) | | DOCUMENT ME!
Parameters: event - Description of the Parameter |
dragExit | public void dragExit(DragSourceEvent event)(Code) | | DOCUMENT ME!
Parameters: event - Description of the Parameter |
dragGestureRecognized | public void dragGestureRecognized(DragGestureEvent event)(Code) | | Default drag and drop interface implementation
Parameters: event - Description of the Parameter |
dropActionChanged | public void dropActionChanged(DragSourceDragEvent event)(Code) | | DOCUMENT ME!
Parameters: event - Description of the Parameter |
getDefaultDataFlavor | public DataFlavor getDefaultDataFlavor()(Code) | | Return the default data flavor DataFlavor.javaJVMLocalObjectMimeType. Or
null if the VM does not support DataFlavor.javaJVMLocalObjectMimeType.
the default data flavor of this drag operation. |
getDragAction | public int getDragAction()(Code) | | Retrun the drag action of this dragable.
the drag action of this dragable. |
getDragCursor | public Cursor getDragCursor()(Code) | | Retrun the cursor for this drag operation.
the cursor to display during this drag operation. |
getTransferData | public Object getTransferData(DataFlavor flavor)(Code) | | Default getTransferData implementation for Transferable.
Parameters: flavor - Description of the Parameter The transferData value |
getTransferDataFlavors | public DataFlavor[] getTransferDataFlavors()(Code) | | Retrieves an array of valid data flavors.
The transferDataFlavors value |
isDataFlavorSupported | public boolean isDataFlavorSupported(DataFlavor flavor)(Code) | | Checks whether the data flavor is supported.
Parameters: flavor - Description of the Parameter The dataFlavorSupported value |
isDraggable | public boolean isDraggable()(Code) | | Determines whether this button isDraggable
The draggable value |
removeDataFlavor | public void removeDataFlavor(DataFlavor flavor)(Code) | | Remove a data flavor for this drag action.
Parameters: flavor - the data flavor to be removed. |
removeDragSourceListener | public void removeDragSourceListener(DragSourceListener listener)(Code) | | DOCUMENT ME!
Parameters: listener - DOCUMENT ME! |
setDefaultTransferData | public void setDefaultTransferData(Object data)(Code) | | Set the default transfer data object. This object is returned when getTransferData
has been passed the default data flavor as its paramter. If data is null,
transfer data will be this object instance.
Parameters: data - the defautl transfer data for the drag operation. |
setDragAction | public void setDragAction(int dragAction)(Code) | | Set the drag action of this label.
Parameters: dragAction - the drag action of this label. |
setDragCursor | public void setDragCursor(Cursor dragCursor)(Code) | | Set the cursor for this drag operation. Default to DragSource.DefaultCopyDrop
if dragCursor is null.
Parameters: dragCursor - the cursor to display during this drag operation. |
setDraggable | public void setDraggable(boolean val)(Code) | | Sets the button's draggablity
Parameters: val - The new draggable value |
|
|
|