|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.ngs.image.ImagePanel
public class ImagePanel
A Custom Panel for interacting with an ImageModel.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
JButton |
btnContDn
|
JButton |
btnContUp
|
JButton |
btnDarken
|
JToggleButton |
btnFit
|
JToggleButton |
btnFitHeight
|
JToggleButton |
btnFitWidth
|
JButton |
btnIn
|
JButton |
btnInvert
|
JButton |
btnLighten
|
JButton |
btnNext
|
JButton |
btnOut
|
JButton |
btnPrev
|
JButton |
btnRotCCW
|
JButton |
btnRotCW
|
protected ImageCanvas |
canvas
|
JMenuItem |
contrastDown
|
JMenuItem |
contrastUp
|
JMenuItem |
darker
|
JCheckBoxMenuItem |
fitHeight
|
JCheckBoxMenuItem |
fitWidth
|
JCheckBoxMenuItem |
fitWindow
|
JMenuItem |
invert
|
JMenuItem |
lighter
|
protected ImageModel |
mdlImage
|
protected JMenu |
mnuImage
|
JMenuItem |
nextPage
|
JMenuItem |
prevPage
|
JMenuItem |
rotateClockwise
|
JMenuItem |
rotateCounterClockwise
|
static int |
SCROLL_BLOCK
|
static int |
SCROLL_DOWN
|
static int |
SCROLL_LEFT
|
static int |
SCROLL_RIGHT
|
static int |
SCROLL_UNIT
|
static int |
SCROLL_UP
|
protected JScrollPane |
scrollPane
|
JMenuItem |
toggleZoom
|
protected JToolBar |
toolBar
|
JMenuItem |
zoomIn
|
JMenuItem |
zoomOut
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ImagePanel()
|
|
ImagePanel(ImageModel model)
Creates a new ImagePanel that uses the given ImageModel. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent ae)
Implements ActionListener. |
void |
addActionListener(ActionListener al)
Adds an ActionListener. |
protected ImageCanvas |
createImageCanvas()
Allows sub-classes of ImagePanel to supply custom ImageCanvases to use as the display for Images. |
ImageCanvas |
getCanvas()
Gets the ImageCanvas used to render the ImageModel. |
JMenu |
getMenu()
|
ImageModel |
getModel()
Gets the current ImageModel being rendered. |
Dimension |
getPreferredSize()
Make sure that if we don't have a model, we're at least 400 pixels tall |
void |
imageChanged(ImageEvent ie)
Implements the ImageEventListener. |
void |
imageError(ImageEvent ie)
Implements the ImageEventListener. |
void |
removeActionListener(ActionListener al)
Removes an ActionListener. |
void |
scroll(int direction,
int speed)
Programmatically scrolls based upon the given direction and speed. |
void |
setModel(ImageModel model)
Sets the ImageModel to render. |
void |
updateToolbar()
Updates the toolbar buttons to accurately reflect the current ImageModel state. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SCROLL_BLOCK
public static final int SCROLL_UNIT
public static final int SCROLL_UP
public static final int SCROLL_DOWN
public static final int SCROLL_LEFT
public static final int SCROLL_RIGHT
protected JScrollPane scrollPane
protected ImageModel mdlImage
protected JToolBar toolBar
public JButton btnPrev
public JButton btnNext
public JButton btnIn
public JButton btnOut
public JToggleButton btnFit
public JToggleButton btnFitWidth
public JToggleButton btnFitHeight
public JButton btnLighten
public JButton btnDarken
public JButton btnContUp
public JButton btnContDn
public JButton btnInvert
public JButton btnRotCW
public JButton btnRotCCW
protected JMenu mnuImage
public JMenuItem prevPage
public JMenuItem nextPage
public JMenuItem zoomIn
public JMenuItem zoomOut
public JMenuItem toggleZoom
public JMenuItem invert
public JMenuItem contrastUp
public JMenuItem contrastDown
public JMenuItem lighter
public JMenuItem darker
public JMenuItem rotateClockwise
public JMenuItem rotateCounterClockwise
public JCheckBoxMenuItem fitWidth
public JCheckBoxMenuItem fitHeight
public JCheckBoxMenuItem fitWindow
protected ImageCanvas canvas
Constructor Detail |
---|
public ImagePanel()
public ImagePanel(ImageModel model)
Method Detail |
---|
public JMenu getMenu()
protected ImageCanvas createImageCanvas()
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public void addActionListener(ActionListener al)
public void removeActionListener(ActionListener al)
public void actionPerformed(ActionEvent ae)
actionPerformed
in interface ActionListener
public void updateToolbar()
public void setModel(ImageModel model)
public ImageModel getModel()
public ImageCanvas getCanvas()
public void scroll(int direction, int speed)
public void imageChanged(ImageEvent ie)
imageChanged
in interface ImageEventListener
public void imageError(ImageEvent ie)
imageError
in interface ImageEventListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |