uk.ac.starlink.ast.gui
Class GraphicsHints

java.lang.Object
  extended by uk.ac.starlink.ast.gui.AbstractPlotControlsModel
      extended by uk.ac.starlink.ast.gui.GraphicsHints
All Implemented Interfaces:
XMLEncodeDecode

public class GraphicsHints
extends AbstractPlotControlsModel

GraphicsHints defines the RenderingHints that should be used when drawing of a Plot. Currently there are only two possible values, antialiased text, or antialiased text and lines.

Since:
$Date$, 16-NOV-2000
Version:
$Id$
Author:
Peter W. Draper
See Also:
Plot, PlotConfig.

Field Summary
protected  boolean allAntialiased
          Whether to antialias everything.
protected  boolean textAntialiased
          Whether to antialias text.
 
Fields inherited from class uk.ac.starlink.ast.gui.AbstractPlotControlsModel
listeners
 
Constructor Summary
GraphicsHints()
          Create an instance.
 
Method Summary
 void applyRenderingHints(Graphics2D g2)
          Apply the RenderingHints description for the current configuration to a graphics object.
 void encode(Element rootElement)
          Encode the internal state of this object so that it is rooted in the given Element.
 String getTagName()
          The name of our enclosing tag.
 boolean isAllAntialiased()
          See if everything should be antialiased.
 boolean isTextAntialiased()
          See if the text should be antialiased.
 void setAllAntialiased(boolean allAntialiased)
          Set if everything should be antialiased.
 void setDefaults()
          Set object back to its defaults.
 void setFromString(String name, String value)
          Set the value of a member variable by matching its name to a known local property string.
 void setTextAntialiased(boolean textAntialiased)
          Set if the text should be antialiased.
 
Methods inherited from class uk.ac.starlink.ast.gui.AbstractPlotControlsModel
addChangeListener, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, booleanFromString, booleanToString, colorFromString, colorToString, decode, doubleFromString, doubleToString, fireChanged, fontFromString, fontToString, getChildren, getElementName, getElementValue, intFromString, intToString, longFromString, longToString, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textAntialiased

protected boolean textAntialiased
Whether to antialias text.


allAntialiased

protected boolean allAntialiased
Whether to antialias everything.

Constructor Detail

GraphicsHints

public GraphicsHints()
Create an instance.

Method Detail

setDefaults

public void setDefaults()
Set object back to its defaults.


isTextAntialiased

public boolean isTextAntialiased()
See if the text should be antialiased.


isAllAntialiased

public boolean isAllAntialiased()
See if everything should be antialiased.


setTextAntialiased

public void setTextAntialiased(boolean textAntialiased)
Set if the text should be antialiased.


setAllAntialiased

public void setAllAntialiased(boolean allAntialiased)
Set if everything should be antialiased.


applyRenderingHints

public void applyRenderingHints(Graphics2D g2)
Apply the RenderingHints description for the current configuration to a graphics object.


getTagName

public String getTagName()
The name of our enclosing tag.

Returns:
the name of the root element.

encode

public void encode(Element rootElement)
Description copied from interface: XMLEncodeDecode
Encode the internal state of this object so that it is rooted in the given Element.

Specified by:
encode in interface XMLEncodeDecode
Specified by:
encode in class AbstractPlotControlsModel
Parameters:
rootElement - the Element within which the object should store its configuration.

setFromString

public void setFromString(String name,
                          String value)
Set the value of a member variable by matching its name to a known local property string.

Specified by:
setFromString in class AbstractPlotControlsModel


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.