Package wprover
Class DrawType
- java.lang.Object
-
- wprover.DrawType
-
public class DrawType extends java.lang.ObjectThe DrawType class represents a drawing type with properties such as color index, dash style, and width. It provides methods to save and load its state, set properties, and retrieve color information.
-
-
Constructor Summary
Constructors Constructor Description DrawType()Default constructor for the DrawType class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetColor()Retrieves the color corresponding to the color index of the DrawType object.intgetColorIndex()Retrieves the color index of the DrawType object.voidLoad(java.io.DataInputStream in)Loads the state of the DrawType object from a DataInputStream.voidSave(java.io.DataOutputStream out)Saves the current state of the DrawType object to a DataOutputStream.voidsetDash(int dash)Sets the dash style for the DrawType object.voidsetWidth(int width)Sets the width for the DrawType object.
-
-
-
Method Detail
-
Save
public void Save(java.io.DataOutputStream out) throws java.io.IOExceptionSaves the current state of the DrawType object to a DataOutputStream.- Parameters:
out- the DataOutputStream to write to- Throws:
java.io.IOException- if an I/O error occurs
-
Load
public void Load(java.io.DataInputStream in) throws java.io.IOExceptionLoads the state of the DrawType object from a DataInputStream.- Parameters:
in- the DataInputStream to read from- Throws:
java.io.IOException- if an I/O error occurs
-
setDash
public void setDash(int dash)
Sets the dash style for the DrawType object.- Parameters:
dash- the dash style to set
-
setWidth
public void setWidth(int width)
Sets the width for the DrawType object.- Parameters:
width- the width to set
-
getColorIndex
public int getColorIndex()
Retrieves the color index of the DrawType object.- Returns:
- the color index
-
getColor
public java.awt.Color getColor()
Retrieves the color corresponding to the color index of the DrawType object.- Returns:
- the color
-
-