| java.awt.Container java.awt.ScrollPane javax.media.jai.widget.ScrollingImagePanel
ScrollingImagePanel | public class ScrollingImagePanel extends ScrollPane implements AdjustmentListener,ComponentListener,MouseListener,MouseMotionListener(Code) | | An extension of java.awt.Panel that contains an ImageCanvas and
vertical and horizontal scrollbars. The origin of the ImageCanvas
is set according to the value of the scrollbars. Additionally, the
origin may be changed by dragging the mouse. The window cursor
will be changed to Cursor.MOVE_CURSOR for the duration of the
drag.
Due to the limitations of BufferedImage, only TYPE_BYTE of band
1, 2, 3, 4, and TYPE_USHORT of band 1, 2, 3 images can be displayed
using this widget.
This class has been deprecated. The source
code has been moved to the samples/widget
directory. These widgets are no longer
supported.
|
Constructor Summary | |
public | ScrollingImagePanel(RenderedImage im, int width, int height) Constructs a ScrollingImagePanel of a given size for a
given RenderedImage. |
beingDragged | protected boolean beingDragged(Code) | | True if we are in the middle of a mouse drag.
|
defaultCursor | protected Cursor defaultCursor(Code) | | A place to save the cursor.
|
im | protected RenderedImage im(Code) | | The RenderedImage displayed by the ImageCanvas.
|
moveSource | protected Point moveSource(Code) | | The initial Point of a mouse drag.
|
panelHeight | protected int panelHeight(Code) | | The height of the panel.
|
panelWidth | protected int panelWidth(Code) | | The width of the panel.
|
viewportListeners | protected Vector viewportListeners(Code) | | Vector of ViewportListeners.
|
ScrollingImagePanel | public ScrollingImagePanel(RenderedImage im, int width, int height)(Code) | | Constructs a ScrollingImagePanel of a given size for a
given RenderedImage.
|
addViewportListener | public void addViewportListener(ViewportListener l)(Code) | | Adds the specified ViewportListener to the panel
|
adjustmentValueChanged | public void adjustmentValueChanged(AdjustmentEvent e)(Code) | | Called by the AWT when either scrollbar changes.
|
componentResized | public void componentResized(ComponentEvent e)(Code) | | Called when the ImagePanel is resized
|
getImageCanvas | public ImageCanvas getImageCanvas()(Code) | | Returns the image canvas. Allows mouse listeners
to be used on the image canvas.
since: JAI 1.1 |
getPreferredSize | public Dimension getPreferredSize()(Code) | | Called by the AWT when instantiating the component.
|
getXCenter | public int getXCenter()(Code) | | Returns the X co-ordinate of the image center.
|
getXOrigin | public int getXOrigin()(Code) | | Returns the XOrigin of the image
|
getYCenter | public int getYCenter()(Code) | | Returns the Y co-ordinate of the image center.
|
getYOrigin | public int getYOrigin()(Code) | | Returns the YOrigin of the image
|
mouseDragged | public void mouseDragged(MouseEvent me)(Code) | | Called by the AWT as the mouse is dragged.
|
mouseExited | public void mouseExited(MouseEvent me)(Code) | | Called by the AWT when the mouse leaves the component.
|
mousePressed | public void mousePressed(MouseEvent me)(Code) | | Called by the AWT when the mouse button is pressed.
|
mouseReleased | public void mouseReleased(MouseEvent me)(Code) | | Called by the AWT when the mouse button is released.
|
removeViewportListener | public void removeViewportListener(ViewportListener l)(Code) | | Removes the specified ViewportListener
|
set | public void set(RenderedImage im)(Code) | | Sets the panel to display the specified image
|
setBounds | public void setBounds(int x, int y, int width, int height)(Code) | | Called by the AWT during instantiation and
when events such as resize occur.
|
setCenter | public synchronized void setCenter(int x, int y)(Code) | | Set the center of the image to the given coordinates
of the scroll window.
|
setOrigin | public void setOrigin(int x, int y)(Code) | | Sets the image origin to a given (x, y) position.
The scrollbars are updated appropriately.
|
updateDrag | protected synchronized void updateDrag(Point moveTarget)(Code) | | Called for each point of a mouse drag.
|
Methods inherited from java.awt.Container | public Component add(Component comp)(Code)(Java Doc) public Component add(String name, Component comp)(Code)(Java Doc) public Component add(Component comp, int index)(Code)(Java Doc) public void add(Component comp, Object constraints)(Code)(Java Doc) public void add(Component comp, Object constraints, int index)(Code)(Java Doc) public synchronized void addContainerListener(ContainerListener l)(Code)(Java Doc) protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public void applyComponentOrientation(ComponentOrientation o)(Code)(Java Doc) public boolean areFocusTraversalKeysSet(int id)(Code)(Java Doc) public int countComponents()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) public Component findComponentAt(int x, int y)(Code)(Java Doc) public Component findComponentAt(Point p)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Component getComponent(int n)(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public int getComponentCount()(Code)(Java Doc) public int getComponentZOrder(Component comp)(Code)(Java Doc) public Component[] getComponents()(Code)(Java Doc) public synchronized ContainerListener[] getContainerListeners()(Code)(Java Doc) public Set<AWTKeyStroke> getFocusTraversalKeys(int id)(Code)(Java Doc) public FocusTraversalPolicy getFocusTraversalPolicy()(Code)(Java Doc) public Insets getInsets()(Code)(Java Doc) public LayoutManager getLayout()(Code)(Java Doc) public T[] getListeners(Class<T> listenerType)(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public Point getMousePosition(boolean allowChildren) throws HeadlessException(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) public Insets insets()(Code)(Java Doc) public void invalidate()(Code)(Java Doc) public boolean isAncestorOf(Component c)(Code)(Java Doc) public boolean isFocusCycleRoot(Container container)(Code)(Java Doc) public boolean isFocusCycleRoot()(Code)(Java Doc) final public boolean isFocusTraversalPolicyProvider()(Code)(Java Doc) public boolean isFocusTraversalPolicySet()(Code)(Java Doc) public void layout()(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintComponents(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printComponents(Graphics g)(Code)(Java Doc) protected void processContainerEvent(ContainerEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) public void remove(int index)(Code)(Java Doc) public void remove(Component comp)(Code)(Java Doc) public void removeAll()(Code)(Java Doc) public synchronized void removeContainerListener(ContainerListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void setComponentZOrder(Component comp, int index)(Code)(Java Doc) public void setFocusCycleRoot(boolean focusCycleRoot)(Code)(Java Doc) public void setFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes)(Code)(Java Doc) public void setFocusTraversalPolicy(FocusTraversalPolicy policy)(Code)(Java Doc) final public void setFocusTraversalPolicyProvider(boolean provider)(Code)(Java Doc) public void setFont(Font f)(Code)(Java Doc) public void setLayout(LayoutManager mgr)(Code)(Java Doc) public void transferFocusDownCycle()(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc) protected void validateTree()(Code)(Java Doc)
|
|
|