public class MMFunctionPanel extends OperationPanel
AttributedStringLabel
for the function name and an
OperationPanel
for the defining expression.
The master MMObjectIF
for this
panel must implement the net.mumie.mathletfactory.algebra.op.UsesOperationIF
interface.javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
DEFAULT_CURSOR, EDITING_MODE, TEXT_CURSOR, TEXTFIELD_FONT, VIEWING_MODE
m_font, m_oldEditForeground, m_oldHighLightForeground, m_preferredHeight, m_preferredWidth, m_properties
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
MMFunctionPanel(MMObjectIF master,
ContainerObjectTransformer transformer)
Constructs the function panel with the given master, which must implement
the
net.mumie.mathletfactory.algebra.op.UsesOperationIF . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createFunctionStringFromLabel(MMObjectIF master)
If this method is called, the function panel generates a function
string (e.g "f(x,y) = ") for the function panel depending
on the masters label (in the above example the label has the value "f").
|
java.lang.String |
getFunctionString()
Returns the string that is displayed before the rendered function expression.
|
boolean |
isShowWarnButton()
Returns whether the warning button should be shown on partially defined expression
|
void |
setBackground(java.awt.Color color)
Sets the color of the background.
|
void |
setForeground(java.awt.Color color)
Sets the color of the font.
|
void |
setFunctionExpression(Operation operation)
Sets the given operation as the function expression to be rendered.
|
void |
setFunctionLabelVisible(boolean visible)
Deprecated.
replaced by
setLabelVisible(boolean) |
void |
setFunctionString(java.lang.String functionString)
Sets the string that is displayed in front of the rendered function
expression.
|
void |
setLabel(java.lang.String label)
Sets the label for this MM-Panel.
|
void |
setShowWarnButton(boolean b)
Sets whether the warning button should be shown on partially defined expression
|
void |
setUI(javax.swing.plaf.PanelUI ui)
Additionally sets the theme property "MMFunctionPanel.font".
|
applyContent, checkContent, getDecimalFormat, getEditingContent, getOperation, getPrecision, isNormalForm, isToolTipVisible, render, setAlignment, setDecimalFormat, setNormalForm, setOperation, setPrecision, setToolTipVisible, toString
addMouseListener, allowEmptyStrings, getCurrentMode, getTextField, getValueViewer, isEditable, isEditingMode, isEmpty, isViewingMode, setEditable, setEdited, setFont, setMinimumViewerSize, setTextVisible, setViewerMargin, showToolTip
addSelectionListener, getBorderColor, getBorderInsets, getDrawableProperties, getFont, getInsets, getMaster, getMaximumSize, getMinimumSize, getPanelRenderingHints, getPreferredPanelSize, getPreferredSize, getPreferredSize, getRootPanel, getSelectionListeners, getViewerComponent, isCompoundPanel, isEdited, isFixedHeight, isFixedWidth, isLabelVisible, isMouseOver, isOwnRootPanel, isSelectable, isSelected, isTextVisible, paintBorder, removeSelectionListener, repaintAll, requestFocusFor, setBorderColor, setEnabled, setHeight, setLabelVisible, setMouseOver, setPreferredSize, setRootPanel, setSelectable, setSelected, setViewerComponent, setWidth
getBaseline, setHorizontalAlignment, setLayout, setVerticalAlignment
getAccessibleContext, getUI, getUIClassID, paramString, updateUI
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, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, 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, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBaseline, getHeight
public MMFunctionPanel(MMObjectIF master, ContainerObjectTransformer transformer)
net.mumie.mathletfactory.algebra.op.UsesOperationIF
.net.mumie.mathletfactory.display.noc.ContainerDrawable#ContainerDrawable(MMObjectIF)
public void setLabel(java.lang.String label)
MMPanel
public java.lang.String createFunctionStringFromLabel(MMObjectIF master)
MMObjectIF.getLabel()
public void setFunctionExpression(Operation operation)
public void setForeground(java.awt.Color color)
setForeground
in class MMEditablePanel
public void setBackground(java.awt.Color color)
setBackground
in class MMPanel
public void setFunctionString(java.lang.String functionString)
master.getLabel()+"(x) ="
.
Note that any given value is rendered in non-italic fashion.public java.lang.String getFunctionString()
public boolean isShowWarnButton()
public void setShowWarnButton(boolean b)
public void setFunctionLabelVisible(boolean visible)
setLabelVisible(boolean)
MMPanel.setLabelVisible(boolean)
public void setUI(javax.swing.plaf.PanelUI ui)
setUI
in class OperationPanel
Further documentation and examples can be found under www.mathletfactory.de.