|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jsky.app.jskycat.JSkyCat
public class JSkyCat
Main class for the JSkyCat application.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
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 static javax.swing.JDesktopPane |
desktop
Main window, when using internal frames |
protected javax.swing.JFileChooser |
fileChooser
File selection dialog, when using internal frames |
protected java.awt.Component |
imageFrame
The main image frame (or internal frame) |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JSkyCat(java.lang.String imageFileOrUrl)
Create the JSkyCat application class and display the contents of the given image file or URL, if not null. |
|
JSkyCat(java.lang.String imageFileOrUrl,
boolean internalFrames,
boolean showNavigator)
Create the JSkyCat application class and display the contents of the given image file or URL, if not null. |
|
JSkyCat(java.lang.String imageFileOrUrl,
boolean internalFrames,
boolean showNavigator,
int portNum)
Create the JSkyCat application class and display the contents of the given image file or URL, if not null. |
Method Summary | |
---|---|
void |
exit()
Exit the application with the given status. |
protected java.lang.String |
getAppName()
Return the name of this application. |
protected java.lang.String |
getAppVersion()
Return the version number of this application as a String. |
static javax.swing.JDesktopPane |
getDesktop()
Return the JDesktopPane, if using internal frames, otherwise null |
protected MainImageDisplay |
getImageDisplay()
Return the main image display |
java.awt.Component |
getImageFrame()
Return the main image frame (JFrame or JInternalFrame) |
static void |
main(java.lang.String[] args)
The main class of the JSkyCat application. |
javax.swing.JFileChooser |
makeFileChooser()
Create and return a new file chooser to be used to select a local catalog file to open. |
protected void |
makeFrameLayout(boolean showNavigator,
java.lang.String imageFileOrUrl)
Do the window layout using normal frames |
protected void |
makeInternalFrameLayout(boolean showNavigator,
java.lang.String imageFileOrUrl)
Do the window layout using internal frames |
protected javax.swing.JMenuBar |
makeMenuBar()
Make and return the application menubar (used when internal frames are in use) |
protected NavigatorFrame |
makeNavigatorFrame(MainImageDisplay imageDisplay)
Make and return a frame for displaying catalog information. |
protected NavigatorImageDisplayFrame |
makeNavigatorImageDisplayFrame(java.lang.String imageFileOrUrl)
Make and return a frame for displaying the given image (may be null). |
protected NavigatorImageDisplayInternalFrame |
makeNavigatorImageDisplayInternalFrame(javax.swing.JDesktopPane desktop,
java.lang.String imageFileOrUrl)
Make and return an internal frame for displaying the given image (may be null). |
protected NavigatorInternalFrame |
makeNavigatorInternalFrame(javax.swing.JDesktopPane desktop,
MainImageDisplay imageDisplay)
Make and return an internal frame for displaying catalog information. |
void |
open()
Display a file chooser to select a filename to display in a new internal frame. |
void |
open(java.lang.String fileOrUrl)
Display the given file or URL in a new internal frame. |
static void |
setDesktop(javax.swing.JDesktopPane dt)
Set the JDesktopPane to use for top level windows, if using internal frames |
protected void |
setDesktopBackground()
Set the desktop background pattern |
void |
setImageFrameVisible(boolean visible)
Convenience method to set the visibility of the image JFrame (or JInternalFrame). |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
protected javax.swing.JFileChooser fileChooser
protected static javax.swing.JDesktopPane desktop
protected java.awt.Component imageFrame
Constructor Detail |
---|
public JSkyCat(java.lang.String imageFileOrUrl, boolean internalFrames, boolean showNavigator, int portNum)
imageFileOrUrl
- an image file or URL to displayinternalFrames
- if true, use internal framesshowNavigator
- if true, display the catalog navigator on startupportNum
- if not zero, listen on this port for remote control commndsJSkyCatRemoteControl
public JSkyCat(java.lang.String imageFileOrUrl, boolean internalFrames, boolean showNavigator)
imageFileOrUrl
- an image file or URL to displayinternalFrames
- if true, use internal framesshowNavigator
- if true, display the catalog navigator on startuppublic JSkyCat(java.lang.String imageFileOrUrl)
imageFileOrUrl
- an image file or URL to displayMethod Detail |
---|
public static javax.swing.JDesktopPane getDesktop()
public static void setDesktop(javax.swing.JDesktopPane dt)
protected void makeInternalFrameLayout(boolean showNavigator, java.lang.String imageFileOrUrl)
showNavigator
- if true, display the catalog navigator on startupimageFileOrUrl
- an image file or URL to displayprotected void makeFrameLayout(boolean showNavigator, java.lang.String imageFileOrUrl)
showNavigator
- if true, display the catalog navigator on startupimageFileOrUrl
- an image file or URL to displayprotected javax.swing.JMenuBar makeMenuBar()
protected NavigatorImageDisplayInternalFrame makeNavigatorImageDisplayInternalFrame(javax.swing.JDesktopPane desktop, java.lang.String imageFileOrUrl)
desktop
- used to display the internal frameimageFileOrUrl
- specifies the iamge file or URL to displayprotected java.lang.String getAppName()
protected java.lang.String getAppVersion()
protected NavigatorImageDisplayFrame makeNavigatorImageDisplayFrame(java.lang.String imageFileOrUrl)
imageFileOrUrl
- specifies the iamge file or URL to displayprotected NavigatorInternalFrame makeNavigatorInternalFrame(javax.swing.JDesktopPane desktop, MainImageDisplay imageDisplay)
desktop
- used to display the internal frameimageDisplay
- used to display images from image serversprotected NavigatorFrame makeNavigatorFrame(MainImageDisplay imageDisplay)
imageDisplay
- used to display images from image serversprotected void setDesktopBackground()
public javax.swing.JFileChooser makeFileChooser()
public void open()
public void open(java.lang.String fileOrUrl)
public void exit()
public java.awt.Component getImageFrame()
protected MainImageDisplay getImageDisplay()
public void setImageFrameVisible(boolean visible)
public static void main(java.lang.String[] args)
Usage: java [-Djsky.catalog.skycat.config=$SKYCAT_CONFIG] JSkyCat [-[no]internalframes] [-shownavigator] [-port portNumber] [imageFileOrUrl]
The jsky.catalog.skycat.config property defines the Skycat style catalog config file to use. (The default uses the ESO Skycat config file).
If -internalframes is specified, internal frames are used. The -nointernalframes option has the opposite effect. (The default is to use internal frames under Windows only).
If -shownavigator is specified, the catalog navigator window is displayed on startup.
The -port option causes the main image window to listen on a socket for client connections. This can be used to remote control the application.
The imageFileOrUrl argument may be an image file or URL to load.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |