Class gz390_screen
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Runnable,Accessible
The gz390_screen class defines public Graphics2D
panel for use by gz390 to define GUAM views:
- tn_screen
- graphic_screen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) Colorvariable(package private) intvariable(package private) intvariable(package private) Rectangle2Dvariable(package private) intvariable(package private) intvariable(package private) FontRenderContextvariable(package private) Fontvariable(package private) intvariable(package private) Graphics2Dvariable(package private) intvariable(package private) BufferedImagevariable(package private) TextLayoutvariable(package private) JScrollPanevariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) Dimensionvariable(package private) Colorvariable(package private) Threadvariable(package private) longvariable(package private) intvariableprivate static final longvariable(package private) tz390variableFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcalc scn_width and scn_height for current scn_rows, scn_cols, scn_fontvoidoverride default paint to draw screen image in panel using current scn_background.voidresize screen to fill current window by adjusting to max font size that will fitvoidrun()run the thingvoidset_screen(int new_rows, int new_cols, Font new_font, Color new_background_color, Color new_text_color) initialize screen panel based on rows, columns, text font and font size, background and text colorvoidstart thread used to repaint image at fixed intervals whenever scn_repaint has been set truevoidset variable to stop scn updatesMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, updateMethods 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, transferFocusDownCycle, validate, validateTreeMethods 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDvariable- See Also:
-
tz390
tz390 tz390variable -
scn_rows
int scn_rowsvariable -
scn_cols
int scn_colsvariable -
scn_font
Font scn_fontvariable -
scn_background_color
Color scn_background_colorvariable -
scn_text_color
Color scn_text_colorvariable -
scn_image
BufferedImage scn_imagevariable -
scn_grid
Graphics2D scn_gridvariable -
scn_context
FontRenderContext scn_contextvariable -
scn_panel
JScrollPane scn_panelvariable -
scn_layout
TextLayout scn_layoutvariable -
max_font_size
int max_font_sizevariable -
min_font_size
int min_font_sizevariable -
scn_font_size
int scn_font_sizevariable -
scn_char_height
int scn_char_heightvariable -
scn_char_base
int scn_char_basevariable -
scn_char_width
int scn_char_widthvariable -
scn_char_rect
Rectangle2D scn_char_rectvariable -
scn_height
int scn_heightvariable -
scn_width
int scn_widthvariable -
scn_size
Dimension scn_sizevariable -
main_width
int main_widthvariable -
main_height
int main_heightvariable -
main_panel_width
int main_panel_widthvariable -
main_panel_height
int main_panel_heightvariable -
scn_ready
boolean scn_readyvariable -
scn_repaint
boolean scn_repaintvariable -
scn_update_thread
Thread scn_update_threadvariable -
scn_update_wait
long scn_update_waitvariable
-
-
Constructor Details
-
gz390_screen
public gz390_screen()Dummy constructor - no initialization needed
-
-
Method Details
-
paint
override default paint to draw screen image in panel using current scn_background.- Overrides:
paintin classJComponent- Parameters:
g- Graphics instance
-
start_scn_updates
public void start_scn_updates()start thread used to repaint image at fixed intervals whenever scn_repaint has been set true -
stop_scn_updates
public void stop_scn_updates()set variable to stop scn updates -
run
public void run()run the thing -
set_screen
public void set_screen(int new_rows, int new_cols, Font new_font, Color new_background_color, Color new_text_color) initialize screen panel based on rows, columns, text font and font size, background and text color- Parameters:
new_rows- numbernew_cols- numbernew_font- Font instancenew_background_color- Color instancenew_text_color- Color instance
-
resize_screen
public void resize_screen()resize screen to fill current window by adjusting to max font size that will fit -
calc_screen_size
private void calc_screen_size()calc scn_width and scn_height for current scn_rows, scn_cols, scn_font
-