home *** CD-ROM | disk | FTP | other *** search
- package com.ibm.ivb.dgraph;
-
- import java.awt.Color;
- import java.awt.Dimension;
- import java.awt.FontMetrics;
- import java.awt.Graphics;
- import java.awt.Point;
- import java.awt.Rectangle;
-
- public abstract class GraphObject {
- private static final String kCBIBMCopyright = "(c) Copyright IBM Corporation 1998";
- public static final int SOLID = 0;
- public static final int SOLID_3D = 1;
- public static final int DASH = 2;
- public static final int EMPTY = 3;
- public static final int FILL = 4;
- Object udata;
- boolean visible = true;
- boolean selected = false;
- boolean opened = false;
- int lineType = 0;
- int fillType = 3;
- Color color;
- Color hcolor;
- Rectangle rect;
-
- public GraphObject() {
- this.color = Color.black;
- this.hcolor = Color.red;
- this.rect = new Rectangle();
- }
-
- public abstract void calculateSize(FontMetrics var1, double var2);
-
- public boolean contains(int var1, int var2) {
- return this.rect.contains(var1, var2);
- }
-
- public boolean contains(Point var1) {
- return this.rect.contains(var1);
- }
-
- public Rectangle getBounds() {
- return this.rect;
- }
-
- public Color getColor() {
- return this.color;
- }
-
- public int getFillType() {
- return this.fillType;
- }
-
- public Color getHilightColor() {
- return this.hcolor;
- }
-
- public int getLineType() {
- return this.lineType;
- }
-
- public Point getLocation() {
- return this.rect.getLocation();
- }
-
- public Dimension getSize() {
- return this.rect.getSize();
- }
-
- public Object getUserData() {
- return this.udata;
- }
-
- public boolean isOpened() {
- return this.opened;
- }
-
- public boolean isSelected() {
- return this.selected;
- }
-
- public boolean isVisible() {
- return this.visible;
- }
-
- public abstract void paint(Graphics var1, FontMetrics var2, double var3);
-
- public void setColor(Color var1) {
- this.color = var1;
- }
-
- public void setFillType(int var1) {
- this.fillType = var1;
- }
-
- public void setHilightColor(Color var1) {
- this.hcolor = var1;
- }
-
- public void setLineType(int var1) {
- this.lineType = var1;
- }
-
- public void setLocation(int var1, int var2) {
- this.rect.x = var1;
- this.rect.y = var2;
- }
-
- public void setOpened(boolean var1) {
- this.opened = var1;
- }
-
- public void setSelected(boolean var1) {
- this.selected = var1;
- }
-
- public void setUserData(Object var1) {
- this.udata = var1;
- }
-
- public void setVisible(boolean var1) {
- this.visible = var1;
- }
- }
-