Class DragWell
All Packages Class Hierarchy This Package Previous Next Index
Class DragWell
public class netscape.application.DragWell
extends netscape.application.View
implements netscape.application.DragSource
{
/* Constructors
*/
public DragWell();
public DragWell(Rect);
public DragWell(int, int, int, int);
/* Methods
*/
public Border border();
public Object data();
public String dataType();
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public void dragWasAccepted(DragSession);
public boolean dragWasRejected(DragSession);
public void drawView(Graphics);
public void encode(Encoder);
public Image image();
public boolean isEnabled();
public boolean isTransparent();
public boolean mouseDown(MouseEvent);
public void setBorder(Border);
public void setData(Object);
public void setDataType(String);
public void setEnabled(boolean);
public void setImage(Image);
public View sourceView(DragSession);
}
View subclass that vends drag-and-droppable items. Unless changed, the
DragWell vends the same data each time the user clicks and drags from
the DragWell.
Constructors
.DragWell
public DragWell()
- Constructs a DragWell with origin (0, 0) and zero width
and height
.DragWell
public DragWell(Rect rect)
- Constructs a DragWell with bounds rect.
.DragWell
public DragWell(int x,
int y,
int width,
int height)
- Constructs a DragWell
with bounds (x, y, width, height).
Methods
public boolean isTransparent()
- Overriden to return false.
- Overrides:
- isTransparent in class View
public void setImage(Image anImage)
- Sets the DragWell's Image, the Image it displays within its bounds,
and then calls its
draw() method to redraw it. If you do not want to immediately
redraw the DragWell, you should first call its
disableDrawing() method.
- See Also:
- disableDrawing
public Image image()
- Returns the DragWell's Image.
- See Also:
- setImage
public void setDataType(String dataType)
- Sets the type of the data represented by the DragWell's Image.
- See Also:
- setDataType
public String dataType()
- Returns the type of the data represented by the DragWell's Image.
- See Also:
- setDataType
public void setData(Object anObject)
- Sets the object represented by the DragWell's Image. When the user
clicks the DragWell, the DragWell initiates a DragSession displaying
the DragWell's Image and containing the DragWell's data.
public Object data()
- Returns the object represented by the DragWell's Image.
- See Also:
- setData
public void setEnabled(boolean flag)
- Disables or enables the DragWell, and calls draw() to redraw it.
A disabled DragWell does not respond to mouse clicks.
If you do not want to immediately
redraw the DragWell, you should first call its
disableDrawing() method.
- See Also:
- disableDrawing
public boolean isEnabled()
- Returns true if the DragWell is enabled.
- See Also:
- setEnabled
public void setBorder(Border newBorder)
- Sets the DragWell's Border.
- See Also:
- Border
public Border border()
- Returns the DragWell's Border.
- See Also:
- setBorder
public boolean mouseDown(MouseEvent event)
- Initiates a DragSession where the user can drag the DragWell's
data, unless the DragWell is disabled (in which case nothing
happens).
- Returns:
- false if disabled, true otherwise.
- Overrides:
- mouseDown in class View
- See Also:
- setEnabled
public void drawView(Graphics g)
- Draws the DragWell by drawing its Border, filled with the DragWell's
Image.
- Overrides:
- drawView in class View
public View sourceView(DragSession session)
- DragSource support method.
- See Also:
- sourceView
public void dragWasAccepted(DragSession session)
- DragSource support method.
- See Also:
- dragAccepted
public boolean dragWasRejected(DragSession session)
- DragSource support method.
- See Also:
- dragRejected
public void describeClassInfo(ClassInfo info)
- Describes the DragWell class' information.
- Overrides:
- describeClassInfo in class View
- See Also:
- describeClassInfo
public void encode(Encoder encoder) throws CodingException
- Encodes the DragWell instance.
- Overrides:
- encode in class View
- See Also:
- encode
public void decode(Decoder decoder) throws CodingException
- Decodes the DragWell instance.
- Overrides:
- decode in class View
- See Also:
- decode
All Packages Class Hierarchy This Package Previous Next Index
Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Oct 1997