UMLViewSettings.java :  » IDE » Schmortopf » Schmortopf » UML » View » Java Open Source

Java Open Source » IDE » Schmortopf 
Schmortopf » Schmortopf » UML » View » UMLViewSettings.java
package Schmortopf.UML.View;

import java.awt.Color;
import java.awt.Font;


/**
 *  Contains colors and ui constants used by the UML view.
 *  Singleton.
 */
public class UMLViewSettings
{
  private static UMLViewSettings Instance = null;

  // Colors for class objects in UML class diagrams:
  private Color   class_paintColor;
  private Color   class_strokeColor;
  private Color   class_paintColorSelected;
  private Color   class_strokeColorSelected;
  private Color   class_paintColorOutsidePackage;
  private Color   class_strokeColorOutsidePackage;
  private float   class_strokeThickness;
   
                   
  // fonts:
  private Font plainFont;
  private Font boldFont;
  
   
  private UMLViewSettings()
  {
    this.class_paintColor = new Color(255,255,255);
    this.class_strokeColor = new Color(0,0,0);

    this.class_paintColorSelected = new Color(255,200,200);
    this.class_strokeColorSelected = new Color(80,0,0);

    this.class_paintColorOutsidePackage = new Color(200,200,255);
    this.class_strokeColorOutsidePackage = new Color(0,0,80);
                                        
    this.class_strokeThickness = 2.0f;
        
    this.plainFont = new Font("DialogInput", Font.PLAIN, 12);
    this.boldFont  = new Font("DialogInput", Font.BOLD,  12);

  } // Constructor


  public Font getBoldFont() {
    return this.boldFont;
  }


  public Font getPlainFont() {
    return this.plainFont;
  }

  public Color getClassPaintColor() {
    return this.class_paintColor;
  }


  public Color getClassStrokeColor() {
    return this.class_strokeColor;
  }


  public Color getClassPaintColorSelected() {
    return this.class_paintColorSelected;
  }


  public Color getClassStrokeColorSelected() {
    return this.class_strokeColorSelected;
  }

  public Color getClassPaintColorOutsidePackage() {
    return this.class_paintColorOutsidePackage;
  }


  public Color getClassStrokeColorOutsidePackage() {
    return this.class_strokeColorOutsidePackage;
  }


  public float getClassStrokeThickness() {
    return this.class_strokeThickness;
  }


  public static UMLViewSettings GetInstance() {
    if( Instance == null ) Instance = new UMLViewSettings();
    return Instance;
  }


} // UMLViewSettings



java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.