net.sourceforge.jeuclid.swing
Class MathComponentUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by net.sourceforge.jeuclid.swing.MathComponentUI
All Implemented Interfaces:
PropertyChangeListener, EventListener
Direct Known Subclasses:
MathComponentUI16

public class MathComponentUI
extends ComponentUI
implements PropertyChangeListener

See http://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing- component.html for details.

Version:
$Revision: 950f3d880cc1 $

Constructor Summary
MathComponentUI()
          Default constructor.
 
Method Summary
 Dimension getMaximumSize(JComponent c)
          
 Dimension getMinimumSize(JComponent c)
          
 List<JEuclidView.NodeRect> getNodesAt(JMathComponent mathComponent, float x, float y)
          Get vector of JEuclidView.NodeRect at a particular mouse position.
 Dimension getPreferredSize(JComponent c)
          
protected  void installDefaults(JComponent c)
          Configures the default properties from L&F.
 void installUI(JComponent c)
          
 void paint(Graphics g, JComponent c)
          
 void propertyChange(PropertyChangeEvent evt)
          
 void uninstallUI(JComponent c)
          
 void update(Graphics g, JComponent c)
          
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathComponentUI

public MathComponentUI()
Default constructor.

Method Detail

paint

public void paint(Graphics g,
                  JComponent c)

Overrides:
paint in class ComponentUI

update

public void update(Graphics g,
                   JComponent c)

Overrides:
update in class ComponentUI

installUI

public void installUI(JComponent c)

Overrides:
installUI in class ComponentUI

installDefaults

protected void installDefaults(JComponent c)
Configures the default properties from L&F.

Parameters:
c - the component

uninstallUI

public void uninstallUI(JComponent c)

Overrides:
uninstallUI in class ComponentUI

propertyChange

public void propertyChange(PropertyChangeEvent evt)

Specified by:
propertyChange in interface PropertyChangeListener

getPreferredSize

public Dimension getPreferredSize(JComponent c)

Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)

Overrides:
getMaximumSize in class ComponentUI

getMinimumSize

public Dimension getMinimumSize(JComponent c)

Overrides:
getMinimumSize in class ComponentUI

getNodesAt

public List<JEuclidView.NodeRect> getNodesAt(JMathComponent mathComponent,
                                             float x,
                                             float y)
Get vector of JEuclidView.NodeRect at a particular mouse position.

Parameters:
mathComponent - MathComponent to look in.
x - x-coord
y - y-coord
Returns:
list of nodes with rendering information


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.