| java.lang.Object javax.swing.ImageIcon com.jgraph.pad.util.JGraphpadImageIcon
JGraphpadImageIcon | public class JGraphpadImageIcon extends ImageIcon (Code) | | This class transform a ImageIcon into a bean, allowing for
encoding and decoding in XML using XMLEncoder and
XMLDecoder .
|
Method Summary | |
public String | getFileName() Returns the file name used to initialize the image. | public void | setFileName(String filename) Initializes this image icon from the specified file. |
JGraphpadImageIcon | public JGraphpadImageIcon()(Code) | | Creates an uninitialized image icon.
|
JGraphpadImageIcon | public JGraphpadImageIcon(String filename)(Code) | | Creates an image icon from the specified file. The image will be
preloaded by using MediaTracker to monitor the loading
answer of the image. The specified String can be a file
name or a file path. When specifying a path, use the Internet-standard
forward-slash ("/") as a separator. (The string is converted to an
URL , so the forward-slash works on all systems.) For example,
specify:
new JGraphpadImageIcon("images/myImage.gif")
The description is initialized to the filename string.
Parameters: filename - A String specifying a filename or path. |
JGraphpadImageIcon | public JGraphpadImageIcon(String filename, String description)(Code) | | Creates an image icon from the specified file. The image will be
preloaded by using MediaTracker to monitor the loading
answer of the image.
Parameters: filename - The name of the file containing the image. Parameters: description - A brief textual description of the image. |
JGraphpadImageIcon | public JGraphpadImageIcon(URL location)(Code) | | Creates an image icon from the specified URL . The image
will be preloaded by using MediaTracker to monitor the
loaded answer of the image. The icon's description is
initialized to be a string representation of the URL.
Parameters: location - The URL for the image. |
JGraphpadImageIcon | public JGraphpadImageIcon(URL location, String description)(Code) | | Creates an image icon from the specified URL . The image
will be preloaded by using MediaTracker to monitor the
loaded answer of the image.
Parameters: location - The URL for the image. Parameters: description - A brief textual description of the image. |
getFileName | public String getFileName()(Code) | | Returns the file name used to initialize the image.
|
setFileName | public void setFileName(String filename)(Code) | | Initializes this image icon from the specified file. The image will be
preloaded by using MediaTracker to monitor the loading
answer of the image. The specified String can be a file
name or a file path. When specifying a path, use the Internet-standard
forward-slash ("/") as a separator. (The string is converted to an
URL , so the forward-slash works on all systems.) For example,
specify:
new BeanifiedIcon().setFileName("images/myImage.gif")
Parameters: filename - A String specifying a filename or path. |
|
|