fr.ove.openmath.jome.ctrlview.bidim
Class GraphicContext

java.lang.Object
  extended byfr.ove.openmath.jome.ctrlview.bidim.GraphicContext
All Implemented Interfaces:
java.io.Serializable

public class GraphicContext
extends java.lang.Object
implements java.io.Serializable

The graphic context of each part of the formula to display.

Version:
1.0 22/06/98
Author:
© 1998 DIRAT Laurent
See Also:
Serialized Form

Constructor Summary
GraphicContext()
          The default constructor.
GraphicContext(java.awt.Font font, java.awt.Color foregroundColor, java.awt.Color backgroundColor, java.awt.Color selectionColor)
          The Constructor.
GraphicContext(GraphicContext gc)
          The constructor by copy.
 
Method Summary
 java.awt.Color getBackgroundColor()
          Returns the background for the display.
 java.awt.Font getFont()
          Returns the font used in the graphic context.
 java.awt.Color getForegroundColor()
          Returns the color used by the graphic context.
 java.awt.Color getSelectionColor()
          Returns the color used in the graphic context to hilight the selection.
 int getSizeRef()
          Returns the reference size of the font.
 java.awt.Font scaleFont(int nbTime)
          Scales the current font.
 void setBackgroundColor(java.awt.Color backgroundColor)
          Sets a new background color for the display.
 void setFont(java.awt.Font font)
          Sets a new font to the context.
 void setForegroundColor(java.awt.Color foregroundColor)
          Sets a new color to the context.
 void setSelectionColor(java.awt.Color selectionColor)
          Sets a new selection color to the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicContext

public GraphicContext()
The default constructor.
The default is :


GraphicContext

public GraphicContext(java.awt.Font font,
                      java.awt.Color foregroundColor,
                      java.awt.Color backgroundColor,
                      java.awt.Color selectionColor)
The Constructor.

Parameters:
font - the font used to display all the text elements.
selectionColor - the color of all the selected elements.

GraphicContext

public GraphicContext(GraphicContext gc)
The constructor by copy.

Parameters:
gc - the graphic context to copy.
Method Detail

getFont

public java.awt.Font getFont()
Returns the font used in the graphic context.


getSizeRef

public int getSizeRef()
Returns the reference size of the font.


getForegroundColor

public java.awt.Color getForegroundColor()
Returns the color used by the graphic context.


getBackgroundColor

public java.awt.Color getBackgroundColor()
Returns the background for the display.


getSelectionColor

public java.awt.Color getSelectionColor()
Returns the color used in the graphic context to hilight the selection.

Returns:
the color.

setFont

public void setFont(java.awt.Font font)
Sets a new font to the context.

Parameters:
font - the new font.

setForegroundColor

public void setForegroundColor(java.awt.Color foregroundColor)
Sets a new color to the context.


setBackgroundColor

public void setBackgroundColor(java.awt.Color backgroundColor)
Sets a new background color for the display.


setSelectionColor

public void setSelectionColor(java.awt.Color selectionColor)
Sets a new selection color to the context.

Parameters:
selectionColor - the new color.

scaleFont

public java.awt.Font scaleFont(int nbTime)
Scales the current font.

Parameters:
nbTime - how many the scale factor is applied.
Returns:
the font scaled.


Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.