| com.xoetrope.swing.XCaptionedImage
XCaptionedImage | public class XCaptionedImage extends XPanel implements XAttributedComponent,XContentHolder,XStateListener,MouseListener(Code) | | An extension of the XImage component that adds a caption to the image and
an optional border
Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
$Revision: 1.21 $
|
borders | protected int borders(Code) | | |
caption | protected XLabel caption(Code) | | |
currentProject | protected XProject currentProject(Code) | | The owner project and the context in which this object operates.
|
image | protected XImage image(Code) | | |
minWidthminHeightmaxWidthmaxHeightprefWidthprefHeight | protected int minWidthminHeightmaxWidthmaxHeightprefWidthprefHeight(Code) | | |
padding | protected int padding(Code) | | |
shadowtooltipSet | protected boolean shadowtooltipSet(Code) | | |
XCaptionedImage | public XCaptionedImage()(Code) | | Creates a new instance of XCaptionedImage
|
add | public void add(Object c, Object constraint)(Code) | | Add a child component
Parameters: c - the child component Parameters: constraint - the layout constraint |
addCaptionListener | public void addCaptionListener(MouseListener l)(Code) | | Adds a mouse listener to this component to listen for mouse events.
Parameters: l - the MouseListener that is to be added. |
findCurrentResponse | public int findCurrentResponse(int x, int y)(Code) | | Find the response corresponding to the current point
Parameters: x - the x coordinate of the mouse click Parameters: y - the y coordinate of the mouse click the response value if the mouse were click at the specified location, or -1 if not selection is available |
fireActionPerformed | protected void fireActionPerformed(MouseEvent event)(Code) | | Notifies all mouse listeners that have registered interest for
notification on mouse event types. The event instance
is lazily created using the event
parameter.
Parameters: event - the MouseEvent object |
getAlignment | public int getAlignment()(Code) | | Get the alignment style constant
the alignment value |
getBorders | public int getBorders()(Code) | | Gets the border flag value.
the border property |
getCaption | public String getCaption()(Code) | | Get the caption
the caption text |
getCaptionStyle | public String getCaptionStyle()(Code) | | Get the caption style
the style name |
getChildComponent | public Object getChildComponent(int i)(Code) | | Get a child component
Parameters: i - the index of the child within the container the child component |
getFillBorder | public boolean getFillBorder()(Code) | | Gets the fill border flag value.
true if the area within the border is filled |
getImage | public XImage getImage()(Code) | | Returns the XImage instance used by ths class.
XImage instance returned. |
getImageName | public String getImageName()(Code) | | Gets the name of the image being displayed.
the image name |
getImageStyle | public String getImageStyle()(Code) | | Get the image style
the style name |
getInsets | public Insets getInsets()(Code) | | Get the insets
the insets |
getMaximumSize | public Dimension getMaximumSize()(Code) | | Get the maximum component size
the maximum size |
getMinHeight | public int getMinHeight()(Code) | | Get the minimum height of the component
the minimum height |
getMinWidth | public int getMinWidth()(Code) | | Get the minimum width of the component
the minimum width |
getMinimumSize | public Dimension getMinimumSize()(Code) | | Get the minimum component size
the minimum size |
getOpaque | public boolean getOpaque()(Code) | | Get the opaque property
the opaque flag |
getPadding | public int getPadding()(Code) | | Get the padding
the padding |
getPreferredSize | public Dimension getPreferredSize()(Code) | | Get the preferred component size
the preferrd size |
getShadow | public boolean getShadow()(Code) | | Gets the shadow flag value.
true if he shadow is drawn |
mouseClicked | public void mouseClicked(MouseEvent e)(Code) | | Fired when a mouse is clicked on this component.
Parameters: e - the passed MouseEvent instance. |
mouseEntered | public void mouseEntered(MouseEvent e)(Code) | | Fired when a mouse enters this component.
Parameters: e - the passed MouseEvent instance. |
mouseExited | public void mouseExited(MouseEvent e)(Code) | | Fired when a mouse exited this component.
Parameters: e - the passed MouseEvent instance. |
mousePressed | public void mousePressed(MouseEvent e)(Code) | | Fired when a mouse is pressed on this component.
Parameters: e - the passed MouseEvent instance. |
mouseReleased | public void mouseReleased(MouseEvent e)(Code) | | Fired when a mouse is released on this component.
Parameters: e - the passed MouseEvent instance. |
paintStates | public void paintStates()(Code) | | Repaint the responses
|
remove | public void remove(Object c)(Code) | | Remove a child component
Parameters: c - the child component |
removeCaptionListener | public void removeCaptionListener(MouseListener l)(Code) | | Removes a mouse listener to this component.
Parameters: l - the MouseListener that is to be removed. |
respond | public boolean respond()(Code) | | Called by XClickListener to check if a response event should be sent to the
parent form. The control can also use this event to do post click processing
true if the parent is to be notified |
setAlignment | public void setAlignment(int align)(Code) | | Set the alignment attribute
Parameters: align - 1 to right align the text, 0 for left alignment and 2 for centered text |
setAttribute | public int setAttribute(String attribName, Object attribValue)(Code) | | Set one or more attributes of the component. Currently this handles the
attributes
- align (left|right|center ) or
- alignment (left|right|center )
- buffered (true|false) double buffering
- tooltip, value=the tooltip text
- caption, value=the text of the caption
- captionStyle, value=style for the caption
- imageStyle, value=style for the image
- border, value=0 for none, 1 for an outer border, 2 for an inner and outer border
- imagename value=the name of a background image to use as a watermark
- painter value=the class name of an XPainter class for painting the panel backgrounds
- arc value=the radius for teh panel corners
- pad value=the amount of padding around the image
- minWidth value=the minimum width
- minHeight value=the minimum height
- tooltip, value=the tooltip text
- opaque, value=true for an opaque image (fills the entire client area)
Parameters: attribName - the attribute name Parameters: attribValue - the attribute value 0 for success |
setBorders | public void setBorders(int bv)(Code) | | Sets the border flag value.
Parameters: bv - the border property |
setCaption | public void setCaption(String s)(Code) | | Set the caption
Parameters: s - the caption text |
setCaptionStyle | public void setCaptionStyle(String newStyle)(Code) | | Set the caption style
Parameters: newStyle - the style name |
setContent | public void setContent(String content)(Code) | | Set the component content - the image name
Parameters: the - content value |
setEnabled | public void setEnabled(boolean state)(Code) | | Set the enabled state
|
setImageName | public void setImageName(String name)(Code) | | Gets the name of the image being displayed.
the image name |
setImageStyle | public void setImageStyle(String newStyle)(Code) | | Set the image style
Parameters: newStyle - the style name |
setMinHeight | public void setMinHeight(int value)(Code) | | Set the minimum height of the component
Parameters: value - the minimum height |
setMinWidth | public void setMinWidth(int value)(Code) | | Set the minimum width of the component
Parameters: value - the minimum width |
setName | public void setName(String value)(Code) | | Sets the XImage instance to have the same name as the instansiating class.
Parameters: value - String specifying the name given tos this class. |
setNextAttributes | public void setNextAttributes(Object attribs)(Code) | | Set the attributes for the next component being added
Parameters: attribs - a table of attributes |
setPadding | public void setPadding(int pad)(Code) | | Set the padding
Parameters: the - padding |
setState | public boolean setState(int x, int y, int defResponse)(Code) | | Find a response
Parameters: x - the x coordinate of the mouse click Parameters: y - the y coordinate of the mouse click Parameters: defResponse - the default response true if a response was found |
setup | public void setup(String name, int preferredWidth, int preferredHeight, Hashtable params)(Code) | | Setup the container
Parameters: name - set the container name Parameters: preferredWidth - the desired width Parameters: preferredHeight - the desired height Parameters: params - a table of extra properties |
updateSelectedState | public void updateSelectedState()(Code) | | Does nothing in this instance
|
|
|