Package net.sourceforge.uiq3.hp45
Class Calculator_Canvas
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- net.sourceforge.uiq3.calculator.Canvas
-
- net.sourceforge.uiq3.hp45.Calculator_Canvas
-
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,net.sourceforge.uiq3.IPropertyNotifier
,net.sourceforge.uiq3.ui.ICalculatorCanvas
public final class Calculator_Canvas extends net.sourceforge.uiq3.calculator.Canvas
- Author:
- martin
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sourceforge.uiq3.calculator.Canvas
net.sourceforge.uiq3.calculator.Canvas.Companion
-
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
Fields Modifier and Type Field Description (package private) JPanel
Bottom_Button_Panel
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_0
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_1
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_1x
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_2
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_3
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_4
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_5
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_6
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_7
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_8
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_9
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_CHS
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_CLx
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_cos
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_Div
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_Dot
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_EEX
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_ENTER
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_ex
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_FIX
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_GOLD
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_ln
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_Minus
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_Mult
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_percent
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_Plus
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_RCL
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_Rdown
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_sin
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_STO
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_tan
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_toP
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_x2
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_xy
(package private) net.sourceforge.uiq3.hp45.Calculator_Button_2
Button_Σplus
(package private) JLabel
Display_Label
(package private) JPanel
Display_Panel
private @Nullable net.sourceforge.uiq3.hp45.Desktop_Calculator
Engine
Calculator to be displayedprivate static Logger
logger
class logger instanceprivate static double
Maximum_Size_Scale
private net.sourceforge.uiq3.ui.IFrame
owner
private static double
SCALE_HEIGHT
private static double
SCALE_WIDTH
private static long
serialVersionUID
private static @NotNull String
TAG
class logger tag.(package private) JPanel
Top_Button_Panel
-
Fields inherited from class net.sourceforge.uiq3.calculator.Canvas
Companion, Extra_Height, Extra_Width, Font, keyboard, Keys_Count
-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description Calculator_Canvas()
Creates new form Calculator_CanvasCalculator_Canvas(net.sourceforge.uiq3.ui.IFrame owner)
Creates new form Calculator_Canvas
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calculateMinimumSize()
void
displayException(@NotNull Throwable Exception)
display additional information on the error. this is device and setup dependent.private Color
getBackgroundDarkColor()
private Color
getDisplayBackgroundColor()
short @NotNull []
getDisplayText(int Row)
Get text currently displayed (as one java string).private Color
getDisplayTextColor()
boolean @NotNull []
getIndicators()
@NotNull String
getJavaText()
Get text currently displayed (as one java string).@NotNull String
getJavaText(int Row)
Get text currently displayed (as one java string).private static Font
getMonoFont()
private void
initComponents()
private void
initPost()
private void
initPre()
private void
propertyChange(PropertyChangeEvent evt)
void
setCalculator(net.sourceforge.uiq3.hp45.Desktop_Calculator Engine)
Set the calculator engine used - needed for status related display.void
setDisplayText(int Row, short @NotNull [] Text)
Set text to be displayed (calculator alpha codes).void
setIndicators(boolean @NotNull [] Indicators)
Set the indicators (Shift, Alpha, Deg, Grad, Gra, etc. pp.)void
setJavaText(@NotNull String Text)
Set text to be displayed.void
setOnOff(boolean on)
set the calculators on of status.@NotNull String
toString()
-
Methods inherited from class net.sourceforge.uiq3.calculator.Canvas
addPropertyChangeListener, addPropertyChangeListener, bindCPUThread, buttonReleased, buttonReleased, getKey, getKeyboard, getPressedKey, getReadKey, getUtf16_Text, isReadKeyAvailable, keyReleased, removePropertyChangeListener, removePropertyChangeListener, setKeyboard, setPressedKey, setReadKey, setUtf16_Text, toggleHelp
-
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, 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, 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, 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, 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, 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, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
Maximum_Size_Scale
private static final double Maximum_Size_Scale
- See Also:
- Constant Field Values
-
SCALE_HEIGHT
private static final double SCALE_HEIGHT
- See Also:
- Constant Field Values
-
SCALE_WIDTH
private static final double SCALE_WIDTH
- See Also:
- Constant Field Values
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
logger
@NotNull private static final Logger logger
class logger instance
-
TAG
@NotNull private static final @NotNull String TAG
class logger tag.
-
owner
@Nullable private final net.sourceforge.uiq3.ui.IFrame owner
-
Engine
@Nullable private @Nullable net.sourceforge.uiq3.hp45.Desktop_Calculator Engine
Calculator to be displayed
-
Bottom_Button_Panel
JPanel Bottom_Button_Panel
-
Button_0
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_0
-
Button_1
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_1
-
Button_1x
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_1x
-
Button_2
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_2
-
Button_3
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_3
-
Button_4
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_4
-
Button_5
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_5
-
Button_6
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_6
-
Button_7
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_7
-
Button_8
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_8
-
Button_9
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_9
-
Button_CHS
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_CHS
-
Button_CLx
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_CLx
-
Button_Div
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_Div
-
Button_Dot
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_Dot
-
Button_EEX
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_EEX
-
Button_ENTER
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_ENTER
-
Button_FIX
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_FIX
-
Button_GOLD
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_GOLD
-
Button_Minus
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_Minus
-
Button_Mult
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_Mult
-
Button_Plus
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_Plus
-
Button_RCL
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_RCL
-
Button_Rdown
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_Rdown
-
Button_STO
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_STO
-
Button_cos
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_cos
-
Button_ex
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_ex
-
Button_ln
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_ln
-
Button_percent
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_percent
-
Button_sin
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_sin
-
Button_tan
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_tan
-
Button_toP
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_toP
-
Button_x2
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_x2
-
Button_xy
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_xy
-
Button_Σplus
net.sourceforge.uiq3.hp45.Calculator_Button_2 Button_Σplus
-
Display_Label
JLabel Display_Label
-
Display_Panel
JPanel Display_Panel
-
Top_Button_Panel
JPanel Top_Button_Panel
-
-
Method Detail
-
getMonoFont
private static Font getMonoFont()
-
getDisplayBackgroundColor
private Color getDisplayBackgroundColor()
-
getDisplayTextColor
private Color getDisplayTextColor()
-
getBackgroundDarkColor
private Color getBackgroundDarkColor()
-
initPre
private void initPre()
-
initPost
private void initPost()
-
calculateMinimumSize
private void calculateMinimumSize()
-
propertyChange
private void propertyChange(PropertyChangeEvent evt)
-
setCalculator
public void setCalculator(net.sourceforge.uiq3.hp45.Desktop_Calculator Engine)
Set the calculator engine used - needed for status related display.- Parameters:
Engine
- calculator engine
-
displayException
public void displayException(@NotNull @NotNull Throwable Exception)
display additional information on the error. this is device and setup dependent.
- Parameters:
Exception
- Exception to display
-
setIndicators
public void setIndicators(boolean @NotNull [] Indicators)
Set the indicators (Shift, Alpha, Deg, Grad, Gra, etc. pp.)
- Parameters:
Indicators
- indicators to be shown
-
getIndicators
@TestOnly public boolean @NotNull [] getIndicators()
-
setDisplayText
public void setDisplayText(int Row, short @NotNull [] Text)
Set text to be displayed (calculator alpha codes). Null implementation for calculators without alpha display.
- Parameters:
Row
- Display row to setText
- Text to display
-
setJavaText
public void setJavaText(@NotNull @NotNull String Text)
Set text to be displayed.- Specified by:
setJavaText
in interfacenet.sourceforge.uiq3.ui.ICalculatorCanvas
- Overrides:
setJavaText
in classnet.sourceforge.uiq3.calculator.Canvas
- Parameters:
Text
- to be displayed
-
getDisplayText
@TestOnly public short @NotNull [] getDisplayText(int Row)
Get text currently displayed (as one java string).- Parameters:
Row
- Display row to set- Returns:
- text currently displayed
-
getJavaText
@NotNull @TestOnly public @NotNull String getJavaText(int Row)
Get text currently displayed (as one java string).
-
getJavaText
@NotNull @TestOnly public @NotNull String getJavaText()
Get text currently displayed (as one java string).- Specified by:
getJavaText
in interfacenet.sourceforge.uiq3.ui.ICalculatorCanvas
- Overrides:
getJavaText
in classnet.sourceforge.uiq3.calculator.Canvas
-
setOnOff
public void setOnOff(boolean on)
set the calculators on of status.
- Parameters:
on
- calculator is switched on
-
initComponents
private void initComponents()
-
toString
@TestOnly @NotNull public @NotNull String toString()
- Overrides:
toString
in classnet.sourceforge.uiq3.calculator.Canvas
-
-