|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jsky.image.gui.ImageDisplayPanel
public class ImageDisplayPanel
An image display control panel.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected javax.swing.JButton |
autocutButton
|
protected int |
bitpix
number of bits per pixel in source image |
protected javax.swing.JLabel |
bitpixLabel
|
protected javax.swing.JLabel |
bitpixValue
|
protected javax.swing.JLabel |
decLabel
|
protected javax.swing.JLabel |
decValue
|
protected javax.swing.JLabel |
equinoxLabel
|
protected javax.swing.JLabel |
equinoxValue
|
protected javax.swing.JLabel |
highLabel
|
protected javax.swing.JTextField |
highValue
|
protected MainImageDisplay |
imageDisplay
|
protected ImageProcessor |
imageProcessor
|
protected GridBagUtil |
layout
|
protected javax.swing.JLabel |
lowLabel
|
protected javax.swing.JTextField |
lowValue
|
protected javax.swing.JLabel |
maxLabel
|
protected static int |
maxScale
|
protected javax.swing.JLabel |
maxValue
|
protected javax.swing.JLabel |
minLabel
|
protected static int |
minScale
|
protected javax.swing.JLabel |
minValue
|
protected static java.text.NumberFormat |
nf
Used to format pixel coordinates. |
protected javax.swing.JLabel |
objectLabel
|
protected javax.swing.JLabel |
objectValue
|
protected int |
orient
panel orientation: one of SwingConstants.HORIZONTAL, .VERTICAL |
protected javax.swing.JLabel |
raLabel
|
protected javax.swing.JLabel |
raValue
|
protected javax.swing.JLabel |
scaleLabel
|
protected javax.swing.JMenu |
scaleMenu
|
protected javax.swing.JMenuBar |
scaleMenuBar
|
protected javax.swing.JLabel |
valueLabel
|
protected javax.swing.JLabel |
valueValue
|
protected javax.swing.JLabel |
xLabel
|
protected javax.swing.JLabel |
xValue
|
protected javax.swing.JLabel |
yLabel
|
protected javax.swing.JLabel |
yValue
|
protected javax.swing.JButton |
zoomInButton
|
protected javax.swing.JButton |
zoomOutButton
|
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 | |
---|---|
ImageDisplayPanel()
Default constructor: must call setImageDisplay() later |
|
ImageDisplayPanel(MainImageDisplay imageDisplay)
Constructor: defaults to vertical layout |
|
ImageDisplayPanel(MainImageDisplay imageDisplay,
int orient)
Create a panel for controlling the given image display |
Method Summary | |
---|---|
protected void |
addScaleMenuItem(javax.swing.ButtonGroup group,
java.lang.String label,
float value)
Add a radio button menu item to the scale menu and given group with the given label and scale value. |
protected void |
autoSetCutLevels()
Automatically set the image cut levels based on the image data |
int |
getBitsPerPixel()
Return the number of bits per pixel in the source image. |
MainImageDisplay |
getImageDisplay()
|
java.lang.String |
getObjectName()
Return the name of the source image, if known, otherwise an empty string. |
java.lang.String |
getScaleLabel(float value)
Get the scale menu label for the given float scale factor. |
protected void |
horizontalPanelLayout()
Combine the panel items in a horizontal layout |
void |
incScale(boolean zoomIn)
Zoom the image in or out, depending on the given argument. |
protected void |
makePanelItems()
Make the display panel items |
protected void |
makeScaleMenu()
Add a menu with zoom settings |
protected void |
makeZoomButtons()
Add buttons "Z" and "z" to zoom in and out by 1 factor. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on the image and then dragged. |
void |
mouseMoved(java.awt.event.MouseEvent e)
|
protected void |
setCutLevels()
Set the image cut levels according to the values in the low and high cut level fields. |
void |
setImageDisplay(MainImageDisplay imageDisplay)
Set the ImageDisplay to work with |
void |
setScale(float value)
Set the scale for the image to the given value and update the menu label. |
protected void |
updateValues()
fill in the label and text field values, where known |
protected void |
verticalPanelLayout()
Combine the panel items in a vertical layout |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ImageProcessor imageProcessor
protected MainImageDisplay imageDisplay
protected GridBagUtil layout
protected javax.swing.JLabel objectLabel
protected javax.swing.JLabel objectValue
protected javax.swing.JLabel xLabel
protected javax.swing.JLabel xValue
protected javax.swing.JLabel yLabel
protected javax.swing.JLabel yValue
protected javax.swing.JLabel valueLabel
protected javax.swing.JLabel valueValue
protected javax.swing.JLabel raLabel
protected javax.swing.JLabel raValue
protected javax.swing.JLabel decLabel
protected javax.swing.JLabel decValue
protected javax.swing.JLabel equinoxLabel
protected javax.swing.JLabel equinoxValue
protected javax.swing.JLabel minLabel
protected javax.swing.JLabel minValue
protected javax.swing.JLabel maxLabel
protected javax.swing.JLabel maxValue
protected javax.swing.JLabel bitpixLabel
protected javax.swing.JLabel bitpixValue
protected javax.swing.JLabel lowLabel
protected javax.swing.JTextField lowValue
protected javax.swing.JLabel highLabel
protected javax.swing.JTextField highValue
protected javax.swing.JButton autocutButton
protected javax.swing.JLabel scaleLabel
protected javax.swing.JMenuBar scaleMenuBar
protected javax.swing.JMenu scaleMenu
protected javax.swing.JButton zoomInButton
protected javax.swing.JButton zoomOutButton
protected static final int minScale
protected static final int maxScale
protected int orient
protected int bitpix
protected static java.text.NumberFormat nf
Constructor Detail |
---|
public ImageDisplayPanel(MainImageDisplay imageDisplay, int orient)
public ImageDisplayPanel(MainImageDisplay imageDisplay)
public ImageDisplayPanel()
Method Detail |
---|
public void setImageDisplay(MainImageDisplay imageDisplay)
public MainImageDisplay getImageDisplay()
protected void makePanelItems()
protected void makeScaleMenu()
protected void addScaleMenuItem(javax.swing.ButtonGroup group, java.lang.String label, float value)
public void setScale(float value)
public java.lang.String getScaleLabel(float value)
public void incScale(boolean zoomIn)
protected void makeZoomButtons()
protected void horizontalPanelLayout()
protected void verticalPanelLayout()
protected void updateValues()
public java.lang.String getObjectName()
public int getBitsPerPixel()
protected void setCutLevels()
protected void autoSetCutLevels()
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |