borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.control
ImageControl component
java.lang.Object
+----java.awt.Component
+----java.awt.Container
+----java.awt.Panel
+----borland.jbcl.view.BeanPanel
+----borland.jbcl.view.FieldView
+----borland.jbcl.control.FieldControl
+----borland.jbcl.control.ImageControl
About the ImageControl component
Variables Constructors Properties Methods Event Listeners
Implements AccessListener, DataChangeListener, NavigationListener, ItemEditSite, ItemPaintSite, SingletonModel, SingletonModelListener, WritableSingletonModel, BlackBox, SingletonView, MenuContainer, FocusListener, KeyListener, ImageObserver, Serializable, EventListener
Provides a container to display a graphic image such as a .gif file. A repository of pixel values to display a graphic image. The image can be specified using an http URL.
The Javasoft image shown below is aligned right, middle within the ImageControl:
ImageControl variables
ImageControl constructors
ImageControl properties
*Read-only properties **Write-only properties
Properties implemented in this class
ImageControl methods
Methods implemented in this class
- action(java.awt.Event, java.lang.Object)
- add(java.awt.PopupMenu)
- bounds()
- checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- checkImage(java.awt.Image, java.awt.image.ImageObserver)
- contains(int, int)
- contains(java.awt.Point)
- createImage(int, int)
- createImage(java.awt.image.ImageProducer)
- disable()
- disableEvents(long)
- dispatchEvent(java.awt.AWTEvent)
- enable()
- enable(boolean)
- enableEvents(long)
- getFontMetrics(java.awt.Font)
- gotFocus(java.awt.Event, java.lang.Object)
- handleEvent(java.awt.Event)
- hide()
- inside(int, int)
- keyDown(java.awt.Event, int)
- keyUp(java.awt.Event, int)
- list()
- list(java.io.PrintStream)
- list(java.io.PrintWriter)
- location()
- lostFocus(java.awt.Event, java.lang.Object)
- mouseDown(java.awt.Event, int, int)
- mouseDrag(java.awt.Event, int, int)
- mouseEnter(java.awt.Event, int, int)
- mouseExit(java.awt.Event, int, int)
- mouseMove(java.awt.Event, int, int)
- mouseUp(java.awt.Event, int, int)
- move(int, int)
- nextFocus()
- paintAll(java.awt.Graphics)
- postEvent(java.awt.Event)
- prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- prepareImage(java.awt.Image, java.awt.image.ImageObserver)
- printAll(java.awt.Graphics)
- processComponentEvent(java.awt.event.ComponentEvent)
- remove(java.awt.MenuComponent)
- repaint()
- repaint(int, int, int, int)
- repaint(long)
- repaint(long, int, int, int, int)
- requestFocus()
- reshape(int, int, int, int)
- resize(int, int)
- resize(java.awt.Dimension)
- setBounds(int, int, int, int)
- setLocation(int, int)
- setSize(int, int)
- show()
- show(boolean)
- size()
- toString()
- transferFocus()
- add(java.awt.Component)
- add(java.awt.Component, int)
- add(java.awt.Component, java.lang.Object)
- add(java.awt.Component, java.lang.Object, int)
- add(java.lang.String, java.awt.Component)
- addImpl(java.awt.Component, java.lang.Object, int)
- countComponents()
- deliverEvent(java.awt.Event)
- getComponent(int)
- getComponentAt(int, int)
- getComponentAt(java.awt.Point)
- insets()
- invalidate()
- isAncestorOf(java.awt.Component)
- layout()
- list(java.io.PrintStream, int)
- list(java.io.PrintWriter, int)
- locate(int, int)
- minimumSize()
- paintComponents(java.awt.Graphics)
- preferredSize()
- print(java.awt.Graphics)
- printComponents(java.awt.Graphics)
- processContainerEvent(java.awt.event.ContainerEvent)
- remove(int)
- remove(java.awt.Component)
- removeAll()
- removeNotify()
- validate()
- validateTree()
ImageControl event listeners
ImageControl constructors
ImageControl()
public ImageControl()
Constructs an ImageControl.
- Sets the alignment so the image fills the image control, using Alignment.HSTRETCH and Alignment.VSTRETCH.
- Sets the preferred control height to 100 pixels.
- Sets EditInPlace to false.
- Calls ImageControl.defaultLayout().
ImageControl properties
image
public Image getImage()
public void setImage(java.awt.Image image)
The image property stores the image in a model, such as SingletonModel, as a data item. The getter returns the image object.
The setter uses ImageControl.setupImage(image, "").
imageName
public String getImageName()
public void setImageName(java.lang.String path)
The image property stores the fully qualified directory and filename for the image.
imageURL
public URL getImageURL()
public void setImageURL(java.net.URL url)
The image property stores the URL for the image, such as: http://www.borland.com/images/circle.gif
model
public void setModel(borland.jbcl.model.SingletonModel model)
The model property specifies the SingletonModel object that provides the image for this component.
ImageControl methods
defaultLayout()
protected void defaultLayout()
Used by the constructor to lay out the ImageControl.
- Sets the model to BasicSingletonContainer.
- Sets the view manager to BasicViewManager.
- Sets the FocusableItemPainter to ImageItemPainter.
- Creates an ImageItemEditor.
setupImage(java.awt.Image, java.lang.String)
protected void setupImage(java.awt.Image im, java.lang.String path)
Calls java.awt.Component.prepareImage() and fills the background color.
updateSelection()
protected void updateSelection()
Calls jbcl.util.ImageLoader.loadFromBlob().
Calls ImageControl.setupImage().
Repaints the image.
ImageControl event listeners
This component is a source for the following event sets.
For information on the standard AWT event sets, see Standard Java events.
For information on the JBCL event sets, see Events in JBCL.
action
public synchronized void addActionListener(java.awt.event.ActionListener l)
public synchronized void removeActionListener(java.awt.event.ActionListener l)
component
public synchronized void addComponentListener(java.awt.event.ComponentListener l)
public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
container
public synchronized void addContainerListener(java.awt.event.ContainerListener l)
public void removeContainerListener(java.awt.event.ContainerListener l)
focus
public synchronized void addFocusListener(java.awt.event.FocusListener l)
public synchronized void removeFocusListener(java.awt.event.FocusListener l)
key
public void addKeyListener(java.awt.event.KeyListener l)
public void removeKeyListener(java.awt.event.KeyListener l)
model
public void addModelListener(borland.jbcl.model.SingletonModelListener l)
public void removeModelListener(borland.jbcl.model.SingletonModelListener l)
mouse
public synchronized void addMouseListener(java.awt.event.MouseListener l)
public synchronized void removeMouseListener(java.awt.event.MouseListener l)
mouseMotion
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener l)
public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener l)