public class JSkyCat extends JFrame
JFrame.AccessibleJFrame
Frame.AccessibleAWTFrame
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected static JDesktopPane |
desktop
Main window, when using internal frames
|
protected JFileChooser |
fileChooser
File selection dialog, when using internal frames
|
protected Component |
imageFrame
The main image frame (or internal frame)
|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JSkyCat(String imageFileOrUrl)
Create the JSkyCat application class and display the contents of the
given image file or URL, if not null.
|
JSkyCat(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(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.
|
Modifier and Type | Method and Description |
---|---|
void |
exit()
Exit the application with the given status.
|
protected String |
getAppName()
Return the name of this application.
|
protected String |
getAppVersion()
Return the version number of this application as a String.
|
static JDesktopPane |
getDesktop()
Return the JDesktopPane, if using internal frames, otherwise null
|
protected MainImageDisplay |
getImageDisplay()
Return the main image display
|
Component |
getImageFrame()
Return the main image frame (JFrame or JInternalFrame)
|
static void |
main(String[] args)
The main class of the JSkyCat application.
|
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,
String imageFileOrUrl)
Do the window layout using normal frames
|
protected void |
makeInternalFrameLayout(boolean showNavigator,
String imageFileOrUrl)
Do the window layout using internal frames
|
protected 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(String imageFileOrUrl)
Make and return a frame for displaying the given image (may be null).
|
protected NavigatorImageDisplayInternalFrame |
makeNavigatorImageDisplayInternalFrame(JDesktopPane desktop,
String imageFileOrUrl)
Make and return an internal frame for displaying the given image (may be null).
|
protected NavigatorInternalFrame |
makeNavigatorInternalFrame(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(String fileOrUrl)
Display the given file or URL in a new internal frame.
|
static void |
setDesktop(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).
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFont, postEvent
protected JFileChooser fileChooser
protected static JDesktopPane desktop
protected Component imageFrame
public JSkyCat(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(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(String imageFileOrUrl)
imageFileOrUrl
- an image file or URL to displaypublic static JDesktopPane getDesktop()
public static void setDesktop(JDesktopPane dt)
protected void makeInternalFrameLayout(boolean showNavigator, String imageFileOrUrl)
showNavigator
- if true, display the catalog navigator on startupimageFileOrUrl
- an image file or URL to displayprotected void makeFrameLayout(boolean showNavigator, String imageFileOrUrl)
showNavigator
- if true, display the catalog navigator on startupimageFileOrUrl
- an image file or URL to displayprotected JMenuBar makeMenuBar()
protected NavigatorImageDisplayInternalFrame makeNavigatorImageDisplayInternalFrame(JDesktopPane desktop, String imageFileOrUrl)
desktop
- used to display the internal frameimageFileOrUrl
- specifies the iamge file or URL to displayprotected String getAppName()
protected String getAppVersion()
protected NavigatorImageDisplayFrame makeNavigatorImageDisplayFrame(String imageFileOrUrl)
imageFileOrUrl
- specifies the iamge file or URL to displayprotected NavigatorInternalFrame makeNavigatorInternalFrame(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 JFileChooser makeFileChooser()
public void open()
public void open(String fileOrUrl)
public void exit()
public Component getImageFrame()
protected MainImageDisplay getImageDisplay()
public void setImageFrameVisible(boolean visible)
public static void main(String[] args)
Usage: java [-Djsky.catalog.skycat.config=$SKYCAT_CONFIG] [-Djsky.util.logger.config=$LOG_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).
The jsky.util.logger.config property defines the log4j config file to use for logging output. (The default file is jsky/util/locConfig.prop).
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.
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.