miSim

misim.editor
Class EditorPrefs

java.lang.Object
  |
  +--misim.editor.EditorPrefs

public class EditorPrefs
extends java.lang.Object


Field Summary
 int blinkRate
          The blink rate for the cursor
 int[] charWidthArray
          Character width array
 boolean expandTabs
          Flag to indicate if tabs should be expanded to spaces when they are typed
 java.lang.String paddedTab
          A Pre-prepared 'tab' mad up of spaces
static java.lang.String SETTING_EXPANDTABS
           
static java.lang.String SETTING_FONT
          Setting names
static java.lang.String SETTING_FONTSIZE
           
static java.lang.String SETTING_TABWIDTH
           
static java.lang.String SETTING_UPPERCASE
           
 int tabPixelWidth
          The number of spaces that represent a tab character
 int tabWidth
          The number of spaces that represent a tab character
 boolean uppercaseCommands
          Flag to indicate if commands should be displayed as uppercase
 
Constructor Summary
EditorPrefs(java.awt.Component owner, SettingsGroup settings, java.util.Vector errLog)
          Construct a new EditorPrefs object for the given graphic component and settings.
 
Method Summary
 int getCharWidth()
          Return the maximum width for a character in this font
 java.awt.Color getColour(int tokenType)
           
 int getDescent()
           
 java.awt.Font getFont()
           
 int getLineHeight()
          Return the height of a line in this font
 int getWidth(java.lang.String text)
           
 void init(java.awt.Component owner, java.util.Vector errLog)
           
 void setDefaults(SettingsGroup settings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uppercaseCommands

public boolean uppercaseCommands
Flag to indicate if commands should be displayed as uppercase

charWidthArray

public int[] charWidthArray
Character width array

blinkRate

public int blinkRate
The blink rate for the cursor

tabWidth

public int tabWidth
The number of spaces that represent a tab character

tabPixelWidth

public int tabPixelWidth
The number of spaces that represent a tab character

expandTabs

public boolean expandTabs
Flag to indicate if tabs should be expanded to spaces when they are typed

paddedTab

public java.lang.String paddedTab
A Pre-prepared 'tab' mad up of spaces

SETTING_FONT

public static final java.lang.String SETTING_FONT
Setting names

SETTING_FONTSIZE

public static final java.lang.String SETTING_FONTSIZE

SETTING_TABWIDTH

public static final java.lang.String SETTING_TABWIDTH

SETTING_EXPANDTABS

public static final java.lang.String SETTING_EXPANDTABS

SETTING_UPPERCASE

public static final java.lang.String SETTING_UPPERCASE
Constructor Detail

EditorPrefs

public EditorPrefs(java.awt.Component owner,
                   SettingsGroup settings,
                   java.util.Vector errLog)
            throws java.lang.Exception
Construct a new EditorPrefs object for the given graphic component and settings.
Parameters:
owner - A Awt component to derive font information from
settings - The editor's settings group
Method Detail

init

public void init(java.awt.Component owner,
                 java.util.Vector errLog)
          throws java.lang.Exception

setDefaults

public void setDefaults(SettingsGroup settings)

getFont

public java.awt.Font getFont()

getLineHeight

public int getLineHeight()
Return the height of a line in this font
Returns:
The height of a line of text

getCharWidth

public int getCharWidth()
Return the maximum width for a character in this font
Returns:
The maximum width of a character

getDescent

public int getDescent()

getWidth

public int getWidth(java.lang.String text)

getColour

public java.awt.Color getColour(int tokenType)

miSim