Glg Toolkit

com.genlogic
Class GlgObject

java.lang.Object
  extended bycom.genlogic.GlgObject
Direct Known Subclasses:
GlgBoxAttr, GlgColorTable, GlgConnection, GlgDataValue, GlgFont, GlgFunction, GlgHistory, GlgMatrix, GlgRenderingAttr, GlgResourceReference, GlgTag, com.genlogic.GlgXformed

public abstract class GlgObject
extends java.lang.Object

Abstract superclass of all Glg objects. Provides both GLG API and Glg Extended API functionality.


Field Summary
static int ABS_FLIPPED_SCREEN_COORD_SYSTEM
          Object coordinate system type constant.
static int ABS_SCREEN_COORD_SYSTEM
          Object coordinate system type constant.
static int ALIAS
          Object type constant.
static int ALIGN_BOTTOM
          Layout action for LayoutObjects method.
static int ALIGN_HCENTER
          Layout action for LayoutObjects method.
static int ALIGN_LEFT
          Layout action for LayoutObjects method.
static int ALIGN_RIGHT
          Layout action for LayoutObjects method.
static int ALIGN_TOP
          Layout action for LayoutObjects method.
static int ALIGN_VCENTER
          Layout action for LayoutObjects method.
static int ANTI_ALIASING_DBL
           
static int ANTI_ALIASING_INT
           
static int ANTI_ALIASING_OFF
          Anti-aliasing constants
static int ANTI_ALIASING_UNSET
           
static int APPLICATION_SHELL
          ShellType constant.
static int ARC
          Object type constant.
static int ARRAY
          Object type constant.
static int ARROW_POSITION_MASK
          Arrow position mask constant.
static int ARROW_TYPE_MASK
          Arrow type mask constant.
static int ATTRIBUTE
          Object type constant.
static int AUTO_CONVEX
          Convex type constants
static int AUTOSCALED_TEXT
          Text subtype constant.
static int B_SPLINE
          SplineType constant.
static int BOOL0_XF
          Boolean xform type constant.
static int BOOL1_XF
          Boolean xform type constant.
static int BOOL10_XF
          Boolean xform type constant.
static int BOOL11_XF
          Boolean xform type constant.
static int BOOL12_XF
          Boolean xform type constant.
static int BOOL13_XF
          Boolean xform type constant.
static int BOOL14_XF
          Boolean xform type constant.
static int BOOL15_XF
          Boolean xform type constant.
static int BOOL16_XF
          Boolean xform type constant.
static int BOOL2_XF
          Boolean xform type constant.
static int BOOL3_XF
          Boolean xform type constant.
static int BOOL4_XF
          Boolean xform type constant.
static int BOOL5_XF
          Boolean xform type constant.
static int BOOL6_XF
          Boolean xform type constant.
static int BOOL7_XF
          Boolean xform type constant.
static int BOOL8_XF
          Boolean xform type constant.
static int BOOL9_XF
          Boolean xform type constant.
static int BOOLEAN_XF
          XformType constant.
static int BOTTOM
           
static int BOUND
          Global type constant.
static int BOX
          MarkerType constant.
static int BOX_ATTR
          Object type constant.
static int BULLETIN_WIDGET
          WidgetType constant.
static int BY_PARENT
          ZSort type constant.
static int C_SPLINE
          SplineType constant.
static int CHORD
          Arc FillType constant.
static int CIRCLE
          MarkerType constant.
static int CIRCULAR_WAVEFORM
          Timer waveform type constant
static int CLICK_SELECTION
          Event types for creating custom event selection messages.
static int CLOSED
          Object OpenType constant.
static int COLOR_XR
          Attribute role constant.
static int COLORTABLE
          Object type constant.
static int CONCATENATE_XF
          XformType constant.
static int CONICAL
          GradientType constant.
static int CONNECTOR
          Object type constant.
static int CONSTRAINED_CLONE
          Clone type constant.
static int CONTAINER_REF
          ReferenceType constant.
static int CONVEX
           
static int CROSS
          MarkerType constant.
static int CROSS_BOX
          MarkerType constant.
static int CROSS_CIRCLE
          MarkerType constant.
static int CURRENT
           
static int D
          Data type constant (double).
static int D_FORMAT_XF
          XformType constant.
static int DATA
          Object type constant.
static int DDATA_XR
          Attribute role constant.
static int DIALOG_AREA_WIDGET
           
static int DIALOG_SHELL
          ShellType constant.
static int DIAMOND
          MarkerType constant.
static int DISPLAY
          Object type constant.
static int DIVIDE_XF
          XformType constant.
static int DONT_ROTATE_PATH
          Path rotation type constant
static int DOT
          MarkerType constant.
static int DOWN_ARROW_WIDGET
          WidgetType constant.
static int DRAWING_AREA_WIDGET
          WidgetType constant.
static int DRAWN_BUTTON_WIDGET
          WidgetType constant.
static int EDGE
          Object FillType constant.
static int ELLIPTICAL
          GradientType constant.
static int END_APOS
          Arrow position constant.
static int END_ARROW
          ArrowType constant.
static int END_FILL_ARROW
          ArrowType constant.
static double EQUATOR_RADIUS
          GIS constants for orthographic projection extent.
static int EXT_LIST_WIDGET
           
static int FILE
          Load type constant: load from a file
static int FILL
          Object FillType constant.
static int FILL_ATYPE
          Arrow type constant.
static int FILL_EDGE
          Object FillType constant.
static int FILL_EDGE_ATYPE
          Arrow type constant.
static int FILLED_BOX
          MarkerType constant.
static int FILLED_CIRCLE
          MarkerType constant.
static int FILLED_DIAMOND
          MarkerType constant.
static int FIXED_IMAGE
          ImageType constant.
static int FIXED_TEXT
          Text subtype constant.
static int FLAT_LIGHT
          Viewport LightType constant.
static int FLIPPED_SCREEN_COORD_SYSTEM
          Drawing coordinate system type constant.
static int FONT
          Object type constant.
static int FONT_SIZE_XR
          Attribute role constant.
static int FONT_TYPE_XR
          Attribute role constant.
static int FONTTABLE
          Object type constant.
static int FORM_WIDGET
          WidgetType constant.
static int FRAME
          Object type constant.
static int FRAME_1D
          FrameType constant.
static int FRAME_2D
          FrameType constant.
static int FRAME_3D
          FrameType constant.
static int FREE_FRAME
          FrameType constant.
static int FULL_CLONE
          Clone type constant.
static int FUNCTION
          Object type constant.
static int G
          Data type constant (geometrical: XYZ or RGB triplet).
static int GDATA_XR
          Attribute role constant.
static int GEOM_XR
          Attribute role constant.
static int GIS
          Object type constant.
static double GIS_OUTSIDE_VALUE
          A negative value for Z coordinates of converted points outside of the visible part of the globe in the orthographic projection.
static int GLG_NON_DRAWABLE_OBJECT
          Glg container data type constant (non-drawable GlgObject for creating custom property groups).
static int GLG_OBJECT
          Glg container data type constant (GlgObject).
static int GLOBAL
          Global type constant.
static int GROUP
          Object type constant: uses a default group type.
static int H_CB
          Callback type constant.
static int HCENTER
          Text horizontal anchoring constant.
static int HISTORY
          Object type constant.
static int HLEFT
          Text horizontal anchoring constant.
static int HORIZONTAL
          Text direction constant.
static int HORIZONTAL_SCALE_WIDGET
          WidgetType constant.
static int HORIZONTAL_SCROLL_WIDGET
          WidgetType constant.
static int HORIZONTAL_SEPARATOR_WIDGET
          WidgetType constant.
static int HRIGHT
          Text horizontal anchoring constant.
static int IMAGE
          Object type constant.
static int INHERIT
          ZSort type constant.
static int INHERIT_COORD_SYSTEM
          Object coordinate system type constant.
static int INPUT_CB
          Callback type constant.
static int INT_VALUE
          Glg container data type constant (integer value).
static int INVERSED_CONICAL
          GradientType constant.
static int INVERSED_ELLIPTICAL
          GradientType constant.
static int INVERSED_LINE_WIDTH_GRADIENT
          GradientType constant.
static int INVERSED_LINEAR
          GradientType constant.
static int INVERSED_LINEAR2
          GradientType constant.
static int INVERSED_SPHERICAL
          GradientType constant.
static int JAVA_OBJECT
          Glg container data type constant (java object).
static int LABEL_WIDGET
          WidgetType constant.
static int LATEST_RELEASE
          Compatibility type constant: latest release compatibility.
static int LEFT_ARROW_WIDGET
          WidgetType constant.
static int LIGHT
          Object type constant.
static int LINE_ATYPE
          Arrow type constant.
static int LINE_FILL
          Object FillType constant.
static int LINE_TYPE_XR
          Attribute role constant.
static int LINE_WIDTH_GRADIENT
          GradientType constant.
static int LINEAR
          GradientType constant.
static int LINEAR2
          GradientType constant.
static int LINEAR2_XF
          XformType constant.
static int LIST
          Object type constant.
static int LIST_WIDGET
          WidgetType constant.
static int LIST_XF
          XformType constant.
static int LOCAL
          Global type constant.
static int MAIN_WINDOW_WIDGET
          WidgetType constant.
static int MAJOR_VERSION
          Major version
static int MARKER
          Object type constant.
static int MATRIX
          Object type constant.
static int MATRIX_XF
          XformType constant.
static int MENU_BAR_WIDGET
          WidgetType constant.
static int MIDDLE_APOS
          Arrow position constant.
static int MIDDLE_ARROW
          ArrowType constant.
static int MIDDLE_FILL_ARROW
          ArrowType constant.
static int MIDDLE_INVERSED_APOS
          Arrow position constant.
static int MIDDLE_INVERSED_ARROW
          ArrowType constant.
static int MIDDLE_INVERSED_FILL_ARROW
          ArrowType constant.
static int MINOR_VERSION
          Minor version
static int MOUSE_CLICK
          Viewport's ProcessMouse mask Enables object selection on mouse click.
static int MOUSE_MOVE_AND_CLICK
          Viewport's ProcessMouse convenience constant that matches ProcessMouse's option in the Builder.
static int MOUSE_MOVE_AND_CLICK_NAMED
          Viewport's ProcessMouse convenience constant that matches ProcessMouse's option in the Builder.
static int MOUSE_OVER_SELECTION
          Viewport's ProcessMouse mask Enables object selection on mouse over.
static int MOUSE_OVER_TOOLTIP
          Viewport's ProcessMouse mask Enables object tooltips on mouse over when used together with MOUSE_OVER_SELECTION.
static int MOVE_SELECTION
          Event types for creating custom event selection messages.
static int MS_FRAME_WIDGET
          WidgetType constant.
static int MULTI_LIST_WIDGET
           
static int NAMED_TOOLTIP
          Viewport's ProcessMouse mask Forces using object names instead of TooltipString resources for tooltips.
static int NO
          ZSort type constant.
static int NO_ARROW
          ArrowType constant.
static int NO_GRADIENT
          GradientType constant.
static int NO_LIGHT
          Viewport LightType constant.
static int NO_MOUSE_EVENTS
          Viewport's ProcessMouse mask Disables all event processing if no other masks are selected.
static int NO_TOP_SHELL
          ShellType constant.
static int NO_ZOOM_MODE
          ZoomMode constant.
static int NON_CONVEX
           
static int O
          Data type constant (object).
static int OBJECT_COORD
          Coordinate type constant for transforming objects.
static int OPEN
          Object OpenType constant.
static int OPEN_INVERSED
          Object OpenType constant.
static int OPTION_MENU_WIDGET
          WidgetType constant.
static int ORTHOGRAPHIC_PROJECTION
          GIS projection type constant.
static int PAN_DRAG_MODE
          ZoomMode constant.
static int PAN_X
          Pan type constant.
static int PAN_XY
           
static int PAN_Y
           
static int PARALLELOGRAM
          Object type constant.
static int PARENT_COORD
          Coordinate type constant for transforming objects.
static int PATH_XF
          XformType constant.
static double POLAR_RADIUS
           
static int POLYGON
          Object type constant.
static int POLYLINE
          Object type constant.
static int POLYSURFACE
          Object type constant.
static int PRE_2_9
          Compatibility type constant: pre-2.9 release compatibility.
static int PULL_DOWN_MENU_WIDGET
          WidgetType constant.
static int PUSH_BUTTON_WIDGET
          WidgetType constant.
static int RANGE_XF
          XformType constant.
static int READY_CB
          Callback type constant.
static int RECTANGULAR_PROJECTION
          GIS projection type constant.
static int REFERENCE
          Object type constant.
static int REFERENCE_REF
          ReferenceType constant.
static int RENDERING
          Object type constant.
static int RIGHT_ARROW_WIDGET
          WidgetType constant.
static int ROTATE_DONT_MOVE_PATH
          Path rotation type constant
static int ROTATE_PATH
          Path rotation type constant
static int ROTATE_X_XF
          XformType constant.
static int ROTATE_Y_XF
          XformType constant.
static int ROTATE_Z_XF
          XformType constant.
static int ROW_COLUMN_WIDGET
          WidgetType constant.
static int S
          Data type constant (string).
static int S_FORMAT_XF
          XformType constant.
static int SAWTOOTH_WAVEFORM
          Timer waveform type constant
static int SCALE_TRANSLATE_XF
          XformType constant.
static int SCALE_TRANSLATE_XYZ_XF
          XformType constant.
static int SCALE_X_XF
          XformType constant.
static int SCALE_XYZ_XF
          XformType constant.
static int SCALE_Y_XF
          XformType constant.
static int SCALE_Z_XF
          XformType constant.
static int SCALED_IMAGE
          ImageType constant.
static int SCREEN
          Object type constant.
static int SCREEN_CENTER_COORD_SYSTEM
          Drawing coordinate system type constant.
static int SCREEN_COORD
          Coordinate type constant for transforming objects.
static int SCREEN_COORD_SYSTEM
          Drawing coordinate system type constant.
static int SCROLLED
          History ScrollType constant.
static int SCROLLED_TEXT
          Text subtype constant.
static int SDATA_XR
          Attribute role constant.
static int SECTOR
          Arc FillType constant.
static int SELECT_CB
          Callback type constant.
static int SEMI_GLOBAL
          Global type constant.
static int SERIES
          Object type constant.
static int SET_EQUAL_HDISTANCE
          Layout action for LayoutObjects method: distribute (centers) evenly across.
static int SET_EQUAL_HSIZE
          Layout action for LayoutObjects method: set same width.
static int SET_EQUAL_HSPACE
          Layout action for LayoutObjects method: space evenly across.
static int SET_EQUAL_SIZE
          Layout action for LayoutObjects method: set same width and height.
static int SET_EQUAL_VDISTANCE
          Layout action for LayoutObjects method: distribute (centers) evenly down.
static int SET_EQUAL_VSIZE
          Layout action for LayoutObjects method: set same height.
static int SET_EQUAL_VSPACE
          Layout action for LayoutObjects method: space evenly down.
static int SET_HDISTANCE
          Layout action for LayoutObjects method: set horizontal distance (between centers).
static int SET_HSIZE
          Layout action for LayoutObjects method: set width.
static int SET_HSPACE
          Layout action for LayoutObjects method: set horizontal space (between objects).
static int SET_VDISTANCE
          Layout action for LayoutObjects method: set vertical distance (between centers).
static int SET_VSIZE
          Layout action for LayoutObjects method: set height.
static int SET_VSPACE
          Layout action for LayoutObjects method: set vertical space (between objects).
static int SHADOW_IN
          ShadowType constant.
static int SHADOW_OUT
          ShadowType constant.
static int SHEAR_X_XF
          XformType constant.
static int SHEAR_Y_XF
          XformType constant.
static int SHEAR_Z_XF
          XformType constant.
static int SINE_WAVEFORM
          Timer waveform type constant
static int SLIST_XF
          XformType constant.
static int SPACED_TEXT
          Text subtype constant.
static int SPECIAL
          ZSort type constant.
static int SPHERICAL
          GradientType constant.
static int SPLINE
          Object type constant.
static int SQUARE_SERIES
          Object type constant.
static int START_AND_ANGLE
          Arc AngleType constant.
static int START_AND_END
          Arc AngleType constant.
static int START_APOS
          Arrow position constant.
static int START_ARROW
          ArrowType constant.
static int START_END_APOS
          Arrow position constant.
static int START_END_ARROW
          ArrowType constant.
static int START_END_FILL_ARROW
          ArrowType constant.
static int START_FILL_ARROW
          ArrowType constant.
static int STRING
          Glg container data type constant (string).
static int STRING_CONCAT_XF
          XformType constant.
static int STRONG_CLONE
          Clone type constant.
static int TAG
          Object type constant.
static int TEXT
          Object type constant.
static int TEXT_EDIT_WIDGET
          WidgetType constant.
static int TEXT_WIDGET
          WidgetType constant.
static int THICKNESS_XR
          Attribute role constant.
static int THRESHOLD_XF
          XformType constant.
static int TIMER_XF
          XformType constant.
static int TOGGLE_BUTTON_WIDGET
          WidgetType constant.
static int TOOLTIP_SELECTION
          Event types for creating custom event selection messages.
static int TOP
           
static int TRACE_CB
          Callback type constant.
static int TRACE2_CB
          Callback type constant.
static int TRANSFER_XF
          XformType constant.
static int TRANSLATE_X_XF
          XformType constant.
static int TRANSLATE_XF
          XformType constant.
static int TRANSLATE_XYZ_XF
          XformType constant.
static int TRANSLATE_Y_XF
          XformType constant.
static int TRANSLATE_Z_XF
          XformType constant.
static int TRIANGLE_WAVEFORM
          Timer waveform type constant
static int UNCONSTRAINED
          Global type constant.
static int UNDEFINED_PROJECTION
          GIS projection type constant.
static int UNDEFINED_XR
          Attribute role constant.
static int UP_ARROW_WIDGET
          WidgetType constant.
static int URL
          Load type: load from a URL
static int USE_FILE
          Reference StorageType constant.
static int USE_PALETTE
          Reference StorageType constant.
static int USE_TEMPLATE
          Reference StorageType constant.
static int V_CB
          Callback type constant.
static int VBOTTOM
          Text vertical anchoring constant.
static int VCENTER
          Text vertical anchoring constant.
static int VECTOR
          Object type constant.
static int VERTICAL
          Text direction constant.
static int VERTICAL_ROTATED_LEFT
          Text direction constant.
static int VERTICAL_ROTATED_RIGHT
          Text direction constant.
static int VERTICAL_SCALE_WIDGET
          WidgetType constant.
static int VERTICAL_SCROLL_WIDGET
          WidgetType constant.
static int VERTICAL_SEPARATOR_WIDGET
          WidgetType constant.
static int VIEWPORT
          Object type constant.
static int VTOP
          Text vertical anchoring constant.
static int WEAK_CLONE
          Clone type constant.
static int WORLD_COORD_SYSTEM
          Drawing coordinate system type constant.
static int WRAPPED
          History ScrollType constant.
static int XFORM
          Object type constant.
static int YES
          ZSort type constant.
static int ZOOM_TO_MODE
          ZoomMode constant.
 
Constructor Summary
GlgObject()
           
 
Method Summary
 void AddListener(int type, java.lang.Object callback)
          Adds listener for GLG events to a viewport object.
 boolean AddObjectAt(java.lang.Object object, int index)
          Adds object to the container at the specified position.
 boolean AddObjectToBottom(java.lang.Object object)
          Adds object to the bottom of the container.
 boolean AddObjectToTop(java.lang.Object object)
          Adds object to the top of the container.
static void Bell()
          Emits an audio beep.
 GlgObject CloneObject(int clone_type)
          Creates and returns a copy of an object according to the clone_type.
static java.lang.String ConcatResNames(java.lang.String resource_name1, java.lang.String resource_name2)
          Concatenates two resource names, inserting the "/" separator if necessary.
 boolean ConstrainObject(GlgObject to_attribute)
          Constrains the attribute object.
 boolean ContainsObject(java.lang.Object object)
          Checks if the object is contained by the container.
 GlgObject CopyObject()
          Creates a copy of an object using FULL_CLONE copy method.
 java.awt.Image CreateImage(java.lang.String res_name)
          Creates an image of the viewport's graphics clipped to the viewport's visible area.
 java.awt.Image CreateImageCustom(java.lang.String res_name, java.awt.Rectangle image_area, int gap)
          Creates an unclipped image of the viewport's graphics within the given rectangular area in screen coordinates.
static java.lang.String CreateIndexedName(java.lang.String template_name, int resource_index)
          Creates an indexed name by inserting a number into the first % character of the name template.
 GlgObject CreateInversedMatrix()
          ADVANCED: Creates and returns a matrix inversed relative to this one.
 GlgObject CreatePointArray(int type)
          ADVANCED: Creates an array containing all of an object's control points.
 GlgObject CreateResourceList(boolean list_named_res, boolean list_def_attr, boolean list_aliases)
          ADVANCED: Queries object's resources.
static GlgObject CreateSelection(GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp)
          ADVANCED: Creates an array of objects selected by a rectangle.
static GlgObject CreateSelection(java.awt.event.MouseEvent event, int delta, GlgObject top_vp, GlgObject selected_vp)
          ADVANCED: Creates object selection from a mouse event.
static GlgObject CreateSelectionMessage(GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp, int selection_type, int button)
          ADVANCED: Alternative interface to custom events.
static GlgObject CreateSelectionNames(GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp)
          ADVANCED: Creates an array of objects selected by a rectangle.
static GlgObject CreateSelectionNames(java.awt.event.MouseEvent event, int delta, GlgObject top_vp, GlgObject selected_vp)
          ADVANCED: Creates object selection from a mouse event.
 GlgObject CreateTagList(boolean unique_tag_sources)
          Returns a list of all tags defined in the object
 boolean DeleteBottomObject()
          Deletes last object from the container.
 boolean DeleteObject(java.lang.Object object)
          Deletes the object from the container.
 boolean DeleteObjectAt(int index)
          Deletes the object of the container at the specified position.
 boolean DeleteTopObject()
          Deletes first object from the container.
 int ExportStrings(java.lang.String filename, int medium_type, char separator1, char separator2, java.lang.String encoding)
          Exports all strings defined in the (drawing) object.
 int ExportTags(java.lang.String filename, int medium_type, char separator1, char separator2, java.lang.String encoding)
          Exports all tag names defined in the (drawing) object.
 boolean FitObject(int coord_type, GlgCube box, boolean keep_ratio)
          Fits an object to the specified box.
 GlgCube GetBox()
          ADVANCED: Returns object's 3D bounding box in screen coordinates.
 GlgObject GetDrawingMatrix()
          ADVANCED: Returns the matrix object of the transformation used to draw the object on the screen.
 java.lang.Double GetDResource(java.lang.String resource_name)
          Returns value of a D (double) resource.
 java.lang.Double GetDTag(java.lang.String tag_name)
          Returns value of a D (double) tag.
 java.lang.Object GetElement(int index)
          Returns container's element at the specified position.
 GlgPoint GetGResource(java.lang.String resource_name)
          Returns value of a G (geometrical or color) resource.
 GlgPoint GetGTag(java.lang.String tag_name)
          Returns value of a G (geometrical or color) tag.
 int GetImageHeight()
           
 int GetImageWidth()
           
 int GetIndex(java.lang.Object object)
          Returns the index of the first occurrence of the object in the container
 GlgMatrixData GetMatrixData(GlgMatrixData matrix_data)
          ADVANCED: Returns values of the matrix's coefficients
 GlgObject GetNamedObject(java.lang.String name)
          Returns container's element with the specified name
 int GetNumParents()
          ADVANCED: Returns the number of object's parents.
 GlgObject GetParent()
          ADVANCED: Returns object parent(s).
 java.lang.Object GetResource(java.lang.String resource_name)
          Finds and returns a resource of an arbitrary type.
 GlgObject GetResourceObject(java.lang.String resource_name)
          Finds and returns a named resource or an attribute of the object.
 int GetSize()
          Returns container's size.
 java.lang.String GetSResource(java.lang.String resource_name)
          Returns value of an S (string) resource.
 java.lang.String GetSTag(java.lang.String tag_name)
          Returns value of an S (string) tag.
 int GetStringIndex(java.lang.String string)
          Returns the index of the first occurrence of the string in a string container
 GlgObject GetTagObject(java.lang.String search_string, boolean by_name, boolean unique_tags, boolean single_tag)
          Finds named tags or a single tag.
 boolean GISConvert(java.lang.String res_name, int coord_type, boolean coord_to_lat_lon, GlgPoint in_point, GlgPoint out_point)
          Performs coordinate conversion between the GIS to GLG coordinate systems using the current settings of the GIS object.
 java.lang.Double GISGetElevation(java.lang.String res_name, java.lang.String layer_name, double lon, double lat)
          Queries map server elevation data.
static void GlmConvert(int projection, boolean stretch, int coord_type, boolean coord_to_lat_lon, GlgPoint center, GlgPoint extent, double angle, double min_x, double max_x, double min_y, double max_y, GlgPoint in_point, GlgPoint out_point)
          Low-level interface to the map server; performs GIS coordinate conversion.
static void GlmConvert(int projection, boolean stretch, int coord_type, boolean coord_to_lat_lon, GlgPoint center, GlgPoint extent, double min_x, double max_x, double min_y, double max_y, GlgPoint in_point, GlgPoint out_point)
           
static boolean HasJava2D()
          Returns true if Java2D is supported by the JVM.
 boolean HasResourceObject(java.lang.String resource_name)
          Checks for the existence of the resource object
 boolean HasTagName(java.lang.String tag_name)
          Checks for an existence of a tag object with the given tag name.
 boolean HasTagSource(java.lang.String tag_source)
          Checks for an existence of a tag object with the given tag source.
 int ImportStrings(java.lang.String filename, int medium_type, boolean verbose, java.lang.String encoding)
          Imports strings from a file or URL and converts matching strings of the (drawing) object.
 int ImportTags(java.lang.String filename, int medium_type, boolean verbose, java.lang.String encoding)
          Imports tag names from a file or URL and converts matching tags of the (drawing) object.
static void Init()
          Initializes Glg Toolkit.
 void InitialDraw()
          Draws a viewport object for the first time.
 void Inverse()
          Reverses the order of the objects in the container.
static boolean IsDemo()
          Returns true if trial version of the jar file is used.
 java.lang.Object Iterate()
          Returns the next element of container.
 boolean LayoutObjects(GlgObject sel_elem, int type, double distance, boolean use_box, boolean process_subobjects)
          Performs layout action on an object or a group of objects.
static GlgObject LoadObject(java.lang.String filename, int medium_type)
          Loads object from a file or URL.
static GlgObject LoadWidget(GlgObject object)
          Finds a viewport named "$Widget" inside an object and returns it.
static GlgObject LoadWidget(java.lang.String filename, int medium_type)
          Loads a viewport named "$Widget" from a file or URL.
 boolean MoveObject(int coord_type, GlgPoint start_point, GlgPoint end_point)
          Moves an object by specified vector.
 boolean MoveObjectBy(int coord_type, double x, double y, double z)
          Moves an object by specified distance in x, y and z directions.
 boolean MoveObjectBy(int coord_type, GlgPoint point)
          Moves an object by specified distance in x, y and z directions.
 boolean NativePrint(java.awt.Graphics graphics)
          Prints the viewport drawing into the print graphics using viewport components's printAll method.
 boolean PositionObject(int coord_type, int anchoring, double x, double y, double z)
          Move object to the specified position.
 boolean PositionObject(int coord_type, int anchoring, GlgPoint position)
          Moves an object to the specified position.
 boolean Print(java.lang.String file, double x, double y, double width, double height, boolean portrait, boolean stretch)
          Prints the viewport's drawing and saves it in a PostScript file.
static java.lang.String Printf(java.lang.String format, double value)
          Utilty function: C-style printf.
static java.lang.String Printf(java.lang.String format, int value)
          Utilty function: C-style printf.
static java.lang.String Printf(java.lang.String format, java.lang.String value)
          Utilty function: C-style printf.
static double Rand(double low, double high)
          Returns a random number in the specified range.
 void ReleaseObject(GlgObject suspend_info)
          Releases the object after suspending for editing.
 boolean ReorderElement(int current_index, int new_index)
          Moves the container's element from the old_index to the new_index position.
 boolean Reset()
          Resets the object hierarchy.
 void ResetHierarchy()
          Resets object hierarchy.
 boolean RotateObject(int coord_type, GlgPoint center, double x, double y, double z)
          Rotates an object around the X, Y or Z axis.
 boolean SaveObject(java.lang.Object media, int media_type)
          Saves an object into a stream.
 boolean SaveObject(java.lang.String filename)
          Saves an object into a file.
 boolean ScaleObject(int coord_type, GlgPoint center, double x, double y, double z)
          Scale object in X, Y and Z dimensions
 boolean ScreenToWorld(boolean inside_vp, GlgPoint in_point, GlgPoint out_point)
          Converts a point from screen to world coordinates.
 java.lang.Object SendMessage(java.lang.String res_name, java.lang.String message, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3, java.lang.Object param4)
          Sends a message to object.
static void SetBrowserObject(GlgObject browser, GlgObject object)
          Sets an object to be browsed by the Glg Resource Browser widget.
 boolean SetDResource(java.lang.String resource_name, double d_value)
          Sets value of a D (double) resource.
 boolean SetDResource(java.lang.String resource_name, java.lang.Double d_value)
          Sets value of a D (double) resource.
 boolean SetDResource(java.lang.String resource_name, double d_value, boolean if_changed)
          Sets value of a D (double) resource.
 boolean SetDResource(java.lang.String resource_name, java.lang.Double d_value, boolean if_changed)
          Sets value of a D (double) resource.
 boolean SetDTag(java.lang.String tag_name, double d_value, boolean if_changed)
          Sets value of a D (double) tag.
 boolean SetDTag(java.lang.String tag_name, java.lang.Double d_value, boolean if_changed)
          Sets value of a D (double) tag.
 boolean SetElement(int index, java.lang.Object new_object)
          Sets an element of a container to a new value.
static GlgErrorHandler SetErrorHandler(GlgErrorHandler new_handler)
          Installs a custom error handler.
 boolean SetGISZoom(java.lang.String res_name, GlgObject gis_object, java.lang.String gis_name)
          Sets the viewport's GIS zoom mode and selects the GIS object to be zoomed.
 boolean SetGResource(java.lang.String resource_name, double g_value1, double g_value2, double g_value3)
          Sets value of a G (geometrical or color) resource.
 boolean SetGResource(java.lang.String resource_name, double g_value1, double g_value2, double g_value3, boolean if_changed)
          Sets value of a G (geometrical or color) resource.
 boolean SetGResource(java.lang.String resource_name, GlgPoint g_value)
          Sets value of a G (geometrical or color) resource.
 boolean SetGResource(java.lang.String resource_name, GlgPoint g_value, boolean if_changed)
          Sets value of a G (geometrical or color) resource.
 boolean SetGTag(java.lang.String tag_name, double g_value1, double g_value2, double g_value3, boolean if_changed)
          Sets value of a G (geometrical or color) tag.
 boolean SetGTag(java.lang.String tag_name, GlgPoint g_value, boolean if_changed)
          Sets value of a G (geometrical or color) tag.
 void SetImageSize(int width, int height)
           
 void SetMatrixData(GlgMatrixData matrix_data)
          ADVANCED: Sets matrix's coefficients to supplied values.
 boolean SetResource(java.lang.String resource_name, java.lang.Object value)
          Sets the new value of the object's attribute of Java Object type.
 boolean SetResourceFromObject(java.lang.String resource_name, GlgObject o_value)
          Sets value of the data or matrix resource to the value of the data object.
 boolean SetResourceFromObject(java.lang.String resource_name, GlgObject o_value, boolean if_changed)
          Sets value of the data or matrix resource to the value of the data object.
 boolean SetResourceObject(java.lang.String resource_name, GlgObject value)
          Sets the new value of the object's attribute.
 boolean SetSResource(java.lang.String resource_name, java.lang.String s_value)
          Sets value of an S (string) resource.
 boolean SetSResource(java.lang.String resource_name, java.lang.String s_value, boolean if_changed)
          Sets value of an S (string) resource.
 boolean SetSResourceFromD(java.lang.String resource_name, java.lang.String format, double d_value)
          Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.
 boolean SetSResourceFromD(java.lang.String resource_name, java.lang.String format, java.lang.Double d_value)
          Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.
 boolean SetSResourceFromD(java.lang.String resource_name, java.lang.String format, double d_value, boolean if_changed)
          Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.
 boolean SetSResourceFromD(java.lang.String resource_name, java.lang.String format, java.lang.Double d_value, boolean if_changed)
          Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.
 boolean SetSTag(java.lang.String tag_name, java.lang.String s_value, boolean if_changed)
          Sets value of an S (string) tag.
 boolean SetSTagFromD(java.lang.String tag_name, java.lang.String format, double d_value, boolean if_changed)
          Sets value of an S (string) tag from a double value, converting the value into a string using a C-style format.
 boolean SetSTagFromD(java.lang.String tag_name, java.lang.String format, java.lang.Double d_value, boolean if_changed)
          Sets value of an S (string) tag from a double value, converting the value into a string using a C-style format.
 void SetStart()
          Initializes container for traversing.
 void SetupHierarchy()
          Sets up object hierarchy.
 boolean SetXform(GlgObject xform)
          Sets the object's transformation to a constrained copy of the xform parameter.
 boolean SetZoom(java.lang.String res_name, char type, double value)
          Programmatic interface for the integrated zoom and pan features.
static boolean Sleep(long milisec)
          Sleeps for the specified number of milliseconds.
 GlgObject SuspendObject()
          Suspends the object for editing.
static boolean Sync()
          Flushes the graphics output.
static boolean SynchronizeImageLoading(boolean synchronize)
           
static void Terminate()
          Destroys Glg Toolkit's internal objects.
static void ThrowExceptionOnError(boolean user_error, boolean internal_error)
          Controls throwing exceptions on errors.
 boolean TransformObject(GlgObject xform, int coord_type, GlgObject parent)
          ADVANCED: Transforms an object's points with a transformation object.
 void TransformPoint(GlgPoint in_point, GlgPoint out_point)
          ADVANCED: Transforms a point with this matrix object.
 boolean UnconstrainObject()
          Unconstrains the attribute object.
 boolean Update()
          Updates the drawing with the latest resource values.
 boolean WorldToScreen(boolean inside_vp, GlgPoint in_point, GlgPoint out_point)
          Converts a point from world to screen coordinates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAJOR_VERSION

public static final int MAJOR_VERSION
Major version

See Also:
Constant Field Values

MINOR_VERSION

public static final int MINOR_VERSION
Minor version

See Also:
Constant Field Values

PRE_2_9

public static final int PRE_2_9
Compatibility type constant: pre-2.9 release compatibility.

See Also:
Constant Field Values

LATEST_RELEASE

public static final int LATEST_RELEASE
Compatibility type constant: latest release compatibility.

See Also:
Constant Field Values

FILE

public static final int FILE
Load type constant: load from a file

See Also:
Constant Field Values

URL

public static final int URL
Load type: load from a URL

See Also:
Constant Field Values

EDGE

public static final int EDGE
Object FillType constant.

See Also:
Constant Field Values

FILL

public static final int FILL
Object FillType constant.

See Also:
Constant Field Values

FILL_EDGE

public static final int FILL_EDGE
Object FillType constant.

See Also:
Constant Field Values

LINE_FILL

public static final int LINE_FILL
Object FillType constant.

See Also:
Constant Field Values

CLOSED

public static final int CLOSED
Object OpenType constant.

See Also:
Constant Field Values

OPEN

public static final int OPEN
Object OpenType constant.

See Also:
Constant Field Values

OPEN_INVERSED

public static final int OPEN_INVERSED
Object OpenType constant.

See Also:
Constant Field Values

CHORD

public static final int CHORD
Arc FillType constant.

See Also:
Constant Field Values

SECTOR

public static final int SECTOR
Arc FillType constant.

See Also:
Constant Field Values

START_AND_ANGLE

public static final int START_AND_ANGLE
Arc AngleType constant.

See Also:
Constant Field Values

START_AND_END

public static final int START_AND_END
Arc AngleType constant.

See Also:
Constant Field Values

CROSS

public static final int CROSS
MarkerType constant.

See Also:
Constant Field Values

BOX

public static final int BOX
MarkerType constant.

See Also:
Constant Field Values

FILLED_BOX

public static final int FILLED_BOX
MarkerType constant.

See Also:
Constant Field Values

CIRCLE

public static final int CIRCLE
MarkerType constant.

See Also:
Constant Field Values

FILLED_CIRCLE

public static final int FILLED_CIRCLE
MarkerType constant.

See Also:
Constant Field Values

DOT

public static final int DOT
MarkerType constant.

See Also:
Constant Field Values

DIAMOND

public static final int DIAMOND
MarkerType constant.

See Also:
Constant Field Values

FILLED_DIAMOND

public static final int FILLED_DIAMOND
MarkerType constant.

See Also:
Constant Field Values

CROSS_BOX

public static final int CROSS_BOX
MarkerType constant.

See Also:
Constant Field Values

CROSS_CIRCLE

public static final int CROSS_CIRCLE
MarkerType constant.

See Also:
Constant Field Values

FIXED_TEXT

public static final int FIXED_TEXT
Text subtype constant.

See Also:
Constant Field Values

AUTOSCALED_TEXT

public static final int AUTOSCALED_TEXT
Text subtype constant.

See Also:
Constant Field Values

SCROLLED_TEXT

public static final int SCROLLED_TEXT
Text subtype constant.

See Also:
Constant Field Values

SPACED_TEXT

public static final int SPACED_TEXT
Text subtype constant.

See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
Text direction constant.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Text direction constant.

See Also:
Constant Field Values

VERTICAL_ROTATED_RIGHT

public static final int VERTICAL_ROTATED_RIGHT
Text direction constant.

See Also:
Constant Field Values

VERTICAL_ROTATED_LEFT

public static final int VERTICAL_ROTATED_LEFT
Text direction constant.

See Also:
Constant Field Values

HCENTER

public static final int HCENTER
Text horizontal anchoring constant.

See Also:
Constant Field Values

HLEFT

public static final int HLEFT
Text horizontal anchoring constant.

See Also:
Constant Field Values

HRIGHT

public static final int HRIGHT
Text horizontal anchoring constant.

See Also:
Constant Field Values

VCENTER

public static final int VCENTER
Text vertical anchoring constant.

See Also:
Constant Field Values

VTOP

public static final int VTOP
Text vertical anchoring constant.

See Also:
Constant Field Values

VBOTTOM

public static final int VBOTTOM
Text vertical anchoring constant.

See Also:
Constant Field Values

B_SPLINE

public static final int B_SPLINE
SplineType constant.

See Also:
Constant Field Values

C_SPLINE

public static final int C_SPLINE
SplineType constant.

See Also:
Constant Field Values

FIXED_IMAGE

public static final int FIXED_IMAGE
ImageType constant.

See Also:
Constant Field Values

SCALED_IMAGE

public static final int SCALED_IMAGE
ImageType constant.

See Also:
Constant Field Values

UNDEFINED_PROJECTION

public static final int UNDEFINED_PROJECTION
GIS projection type constant.

See Also:
Constant Field Values

RECTANGULAR_PROJECTION

public static final int RECTANGULAR_PROJECTION
GIS projection type constant.

See Also:
Constant Field Values

ORTHOGRAPHIC_PROJECTION

public static final int ORTHOGRAPHIC_PROJECTION
GIS projection type constant.

See Also:
Constant Field Values

EQUATOR_RADIUS

public static final double EQUATOR_RADIUS
GIS constants for orthographic projection extent.

See Also:
Constant Field Values

POLAR_RADIUS

public static final double POLAR_RADIUS
See Also:
Constant Field Values

GIS_OUTSIDE_VALUE

public static final double GIS_OUTSIDE_VALUE
A negative value for Z coordinates of converted points outside of the visible part of the globe in the orthographic projection.

See Also:
Constant Field Values

SAWTOOTH_WAVEFORM

public static final int SAWTOOTH_WAVEFORM
Timer waveform type constant

See Also:
Constant Field Values

TRIANGLE_WAVEFORM

public static final int TRIANGLE_WAVEFORM
Timer waveform type constant

See Also:
Constant Field Values

CIRCULAR_WAVEFORM

public static final int CIRCULAR_WAVEFORM
Timer waveform type constant

See Also:
Constant Field Values

SINE_WAVEFORM

public static final int SINE_WAVEFORM
Timer waveform type constant

See Also:
Constant Field Values

DONT_ROTATE_PATH

public static final int DONT_ROTATE_PATH
Path rotation type constant

See Also:
Constant Field Values

ROTATE_PATH

public static final int ROTATE_PATH
Path rotation type constant

See Also:
Constant Field Values

ROTATE_DONT_MOVE_PATH

public static final int ROTATE_DONT_MOVE_PATH
Path rotation type constant

See Also:
Constant Field Values

REFERENCE_REF

public static final int REFERENCE_REF
ReferenceType constant.

See Also:
Constant Field Values

CONTAINER_REF

public static final int CONTAINER_REF
ReferenceType constant.

See Also:
Constant Field Values

USE_TEMPLATE

public static final int USE_TEMPLATE
Reference StorageType constant.

See Also:
Constant Field Values

USE_FILE

public static final int USE_FILE
Reference StorageType constant.

See Also:
Constant Field Values

USE_PALETTE

public static final int USE_PALETTE
Reference StorageType constant.

See Also:
Constant Field Values

INHERIT

public static final int INHERIT
ZSort type constant.

See Also:
Constant Field Values

YES

public static final int YES
ZSort type constant.

See Also:
Constant Field Values

NO

public static final int NO
ZSort type constant.

See Also:
Constant Field Values

BY_PARENT

public static final int BY_PARENT
ZSort type constant.

See Also:
Constant Field Values

SPECIAL

public static final int SPECIAL
ZSort type constant.

See Also:
Constant Field Values

WRAPPED

public static final int WRAPPED
History ScrollType constant.

See Also:
Constant Field Values

SCROLLED

public static final int SCROLLED
History ScrollType constant.

See Also:
Constant Field Values

NO_LIGHT

public static final int NO_LIGHT
Viewport LightType constant.

See Also:
Constant Field Values

FLAT_LIGHT

public static final int FLAT_LIGHT
Viewport LightType constant.

See Also:
Constant Field Values

REFERENCE

public static final int REFERENCE
Object type constant.

See Also:
Constant Field Values

DATA

public static final int DATA
Object type constant.

See Also:
Constant Field Values

ATTRIBUTE

public static final int ATTRIBUTE
Object type constant.

See Also:
Constant Field Values

MATRIX

public static final int MATRIX
Object type constant.

See Also:
Constant Field Values

FUNCTION

public static final int FUNCTION
Object type constant.

See Also:
Constant Field Values

XFORM

public static final int XFORM
Object type constant.

See Also:
Constant Field Values

VECTOR

public static final int VECTOR
Object type constant.

See Also:
Constant Field Values

POLYGON

public static final int POLYGON
Object type constant.

See Also:
Constant Field Values

ARRAY

public static final int ARRAY
Object type constant.

See Also:
Constant Field Values

LIST

public static final int LIST
Object type constant.

See Also:
Constant Field Values

SCREEN

public static final int SCREEN
Object type constant.

See Also:
Constant Field Values

DISPLAY

public static final int DISPLAY
Object type constant.

See Also:
Constant Field Values

VIEWPORT

public static final int VIEWPORT
Object type constant.

See Also:
Constant Field Values

MARKER

public static final int MARKER
Object type constant.

See Also:
Constant Field Values

TEXT

public static final int TEXT
Object type constant.

See Also:
Constant Field Values

FONTTABLE

public static final int FONTTABLE
Object type constant.

See Also:
Constant Field Values

ALIAS

public static final int ALIAS
Object type constant.

See Also:
Constant Field Values

ARC

public static final int ARC
Object type constant.

See Also:
Constant Field Values

PARALLELOGRAM

public static final int PARALLELOGRAM
Object type constant.

See Also:
Constant Field Values

SQUARE_SERIES

public static final int SQUARE_SERIES
Object type constant.

See Also:
Constant Field Values

SERIES

public static final int SERIES
Object type constant.

See Also:
Constant Field Values

COLORTABLE

public static final int COLORTABLE
Object type constant.

See Also:
Constant Field Values

HISTORY

public static final int HISTORY
Object type constant.

See Also:
Constant Field Values

POLYLINE

public static final int POLYLINE
Object type constant.

See Also:
Constant Field Values

POLYSURFACE

public static final int POLYSURFACE
Object type constant.

See Also:
Constant Field Values

FRAME

public static final int FRAME
Object type constant.

See Also:
Constant Field Values

FONT

public static final int FONT
Object type constant.

See Also:
Constant Field Values

IMAGE

public static final int IMAGE
Object type constant.

See Also:
Constant Field Values

CONNECTOR

public static final int CONNECTOR
Object type constant.

See Also:
Constant Field Values

SPLINE

public static final int SPLINE
Object type constant.

See Also:
Constant Field Values

RENDERING

public static final int RENDERING
Object type constant.

See Also:
Constant Field Values

BOX_ATTR

public static final int BOX_ATTR
Object type constant.

See Also:
Constant Field Values

LIGHT

public static final int LIGHT
Object type constant.

See Also:
Constant Field Values

GIS

public static final int GIS
Object type constant.

See Also:
Constant Field Values

TAG

public static final int TAG
Object type constant.

See Also:
Constant Field Values

GROUP

public static final int GROUP
Object type constant: uses a default group type.

See Also:
Constant Field Values

S

public static final int S
Data type constant (string).

See Also:
Constant Field Values

D

public static final int D
Data type constant (double).

See Also:
Constant Field Values

G

public static final int G
Data type constant (geometrical: XYZ or RGB triplet).

See Also:
Constant Field Values

O

public static final int O
Data type constant (object).

See Also:
Constant Field Values

GLG_OBJECT

public static final int GLG_OBJECT
Glg container data type constant (GlgObject).

See Also:
Constant Field Values

STRING

public static final int STRING
Glg container data type constant (string).

See Also:
Constant Field Values

INT_VALUE

public static final int INT_VALUE
Glg container data type constant (integer value).

See Also:
Constant Field Values

JAVA_OBJECT

public static final int JAVA_OBJECT
Glg container data type constant (java object).

See Also:
Constant Field Values

GLG_NON_DRAWABLE_OBJECT

public static final int GLG_NON_DRAWABLE_OBJECT
Glg container data type constant (non-drawable GlgObject for creating custom property groups).

See Also:
Constant Field Values

WEAK_CLONE

public static final int WEAK_CLONE
Clone type constant.

See Also:
Constant Field Values

STRONG_CLONE

public static final int STRONG_CLONE
Clone type constant.

See Also:
Constant Field Values

FULL_CLONE

public static final int FULL_CLONE
Clone type constant.

See Also:
Constant Field Values

CONSTRAINED_CLONE

public static final int CONSTRAINED_CLONE
Clone type constant.

See Also:
Constant Field Values

FRAME_1D

public static final int FRAME_1D
FrameType constant.

See Also:
Constant Field Values

FRAME_2D

public static final int FRAME_2D
FrameType constant.

See Also:
Constant Field Values

FRAME_3D

public static final int FRAME_3D
FrameType constant.

See Also:
Constant Field Values

FREE_FRAME

public static final int FREE_FRAME
FrameType constant.

See Also:
Constant Field Values

TRANSLATE_XF

public static final int TRANSLATE_XF
XformType constant.

See Also:
Constant Field Values

MATRIX_XF

public static final int MATRIX_XF
XformType constant.

See Also:
Constant Field Values

PATH_XF

public static final int PATH_XF
XformType constant.

See Also:
Constant Field Values

TRANSLATE_X_XF

public static final int TRANSLATE_X_XF
XformType constant.

See Also:
Constant Field Values

TRANSLATE_Y_XF

public static final int TRANSLATE_Y_XF
XformType constant.

See Also:
Constant Field Values

TRANSLATE_Z_XF

public static final int TRANSLATE_Z_XF
XformType constant.

See Also:
Constant Field Values

TRANSLATE_XYZ_XF

public static final int TRANSLATE_XYZ_XF
XformType constant.

See Also:
Constant Field Values

SCALE_X_XF

public static final int SCALE_X_XF
XformType constant.

See Also:
Constant Field Values

SCALE_Y_XF

public static final int SCALE_Y_XF
XformType constant.

See Also:
Constant Field Values

SCALE_Z_XF

public static final int SCALE_Z_XF
XformType constant.

See Also:
Constant Field Values

SCALE_XYZ_XF

public static final int SCALE_XYZ_XF
XformType constant.

See Also:
Constant Field Values

ROTATE_X_XF

public static final int ROTATE_X_XF
XformType constant.

See Also:
Constant Field Values

ROTATE_Y_XF

public static final int ROTATE_Y_XF
XformType constant.

See Also:
Constant Field Values

ROTATE_Z_XF

public static final int ROTATE_Z_XF
XformType constant.

See Also:
Constant Field Values

CONCATENATE_XF

public static final int CONCATENATE_XF
XformType constant.

See Also:
Constant Field Values

D_FORMAT_XF

public static final int D_FORMAT_XF
XformType constant.

See Also:
Constant Field Values

S_FORMAT_XF

public static final int S_FORMAT_XF
XformType constant.

See Also:
Constant Field Values

LIST_XF

public static final int LIST_XF
XformType constant.

See Also:
Constant Field Values

DIVIDE_XF

public static final int DIVIDE_XF
XformType constant.

See Also:
Constant Field Values

TRANSFER_XF

public static final int TRANSFER_XF
XformType constant.

See Also:
Constant Field Values

RANGE_XF

public static final int RANGE_XF
XformType constant.

See Also:
Constant Field Values

THRESHOLD_XF

public static final int THRESHOLD_XF
XformType constant.

See Also:
Constant Field Values

SCALE_TRANSLATE_XF

public static final int SCALE_TRANSLATE_XF
XformType constant.

See Also:
Constant Field Values

SCALE_TRANSLATE_XYZ_XF

public static final int SCALE_TRANSLATE_XYZ_XF
XformType constant.

See Also:
Constant Field Values

LINEAR2_XF

public static final int LINEAR2_XF
XformType constant.

See Also:
Constant Field Values

SHEAR_X_XF

public static final int SHEAR_X_XF
XformType constant.

See Also:
Constant Field Values

SHEAR_Y_XF

public static final int SHEAR_Y_XF
XformType constant.

See Also:
Constant Field Values

SHEAR_Z_XF

public static final int SHEAR_Z_XF
XformType constant.

See Also:
Constant Field Values

TIMER_XF

public static final int TIMER_XF
XformType constant.

See Also:
Constant Field Values

BOOLEAN_XF

public static final int BOOLEAN_XF
XformType constant.

See Also:
Constant Field Values

SLIST_XF

public static final int SLIST_XF
XformType constant.

See Also:
Constant Field Values

STRING_CONCAT_XF

public static final int STRING_CONCAT_XF
XformType constant.

See Also:
Constant Field Values

BOOL0_XF

public static final int BOOL0_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL1_XF

public static final int BOOL1_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL2_XF

public static final int BOOL2_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL3_XF

public static final int BOOL3_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL4_XF

public static final int BOOL4_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL5_XF

public static final int BOOL5_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL6_XF

public static final int BOOL6_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL7_XF

public static final int BOOL7_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL8_XF

public static final int BOOL8_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL9_XF

public static final int BOOL9_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL10_XF

public static final int BOOL10_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL11_XF

public static final int BOOL11_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL12_XF

public static final int BOOL12_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL13_XF

public static final int BOOL13_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL14_XF

public static final int BOOL14_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL15_XF

public static final int BOOL15_XF
Boolean xform type constant.

See Also:
Constant Field Values

BOOL16_XF

public static final int BOOL16_XF
Boolean xform type constant.

See Also:
Constant Field Values

UNDEFINED_XR

public static final int UNDEFINED_XR
Attribute role constant.

See Also:
Constant Field Values

GEOM_XR

public static final int GEOM_XR
Attribute role constant.

See Also:
Constant Field Values

COLOR_XR

public static final int COLOR_XR
Attribute role constant.

See Also:
Constant Field Values

THICKNESS_XR

public static final int THICKNESS_XR
Attribute role constant.

See Also:
Constant Field Values

LINE_TYPE_XR

public static final int LINE_TYPE_XR
Attribute role constant.

See Also:
Constant Field Values

FONT_TYPE_XR

public static final int FONT_TYPE_XR
Attribute role constant.

See Also:
Constant Field Values

FONT_SIZE_XR

public static final int FONT_SIZE_XR
Attribute role constant.

See Also:
Constant Field Values

GDATA_XR

public static final int GDATA_XR
Attribute role constant.

See Also:
Constant Field Values

DDATA_XR

public static final int DDATA_XR
Attribute role constant.

See Also:
Constant Field Values

SDATA_XR

public static final int SDATA_XR
Attribute role constant.

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

TOP

public static final int TOP
See Also:
Constant Field Values

CURRENT

public static final int CURRENT
See Also:
Constant Field Values

LOCAL

public static final int LOCAL
Global type constant.

See Also:
Constant Field Values

SEMI_GLOBAL

public static final int SEMI_GLOBAL
Global type constant.

See Also:
Constant Field Values

GLOBAL

public static final int GLOBAL
Global type constant.

See Also:
Constant Field Values

UNCONSTRAINED

public static final int UNCONSTRAINED
Global type constant.

See Also:
Constant Field Values

BOUND

public static final int BOUND
Global type constant.

See Also:
Constant Field Values

INPUT_CB

public static final int INPUT_CB
Callback type constant.

See Also:
Constant Field Values

SELECT_CB

public static final int SELECT_CB
Callback type constant.

See Also:
Constant Field Values

TRACE_CB

public static final int TRACE_CB
Callback type constant.

See Also:
Constant Field Values

READY_CB

public static final int READY_CB
Callback type constant.

See Also:
Constant Field Values

H_CB

public static final int H_CB
Callback type constant.

See Also:
Constant Field Values

V_CB

public static final int V_CB
Callback type constant.

See Also:
Constant Field Values

TRACE2_CB

public static final int TRACE2_CB
Callback type constant.

See Also:
Constant Field Values

DRAWING_AREA_WIDGET

public static final int DRAWING_AREA_WIDGET
WidgetType constant.

See Also:
Constant Field Values

PUSH_BUTTON_WIDGET

public static final int PUSH_BUTTON_WIDGET
WidgetType constant.

See Also:
Constant Field Values

DRAWN_BUTTON_WIDGET

public static final int DRAWN_BUTTON_WIDGET
WidgetType constant.

See Also:
Constant Field Values

TOGGLE_BUTTON_WIDGET

public static final int TOGGLE_BUTTON_WIDGET
WidgetType constant.

See Also:
Constant Field Values

MAIN_WINDOW_WIDGET

public static final int MAIN_WINDOW_WIDGET
WidgetType constant.

See Also:
Constant Field Values

BULLETIN_WIDGET

public static final int BULLETIN_WIDGET
WidgetType constant.

See Also:
Constant Field Values

FORM_WIDGET

public static final int FORM_WIDGET
WidgetType constant.

See Also:
Constant Field Values

ROW_COLUMN_WIDGET

public static final int ROW_COLUMN_WIDGET
WidgetType constant.

See Also:
Constant Field Values

LEFT_ARROW_WIDGET

public static final int LEFT_ARROW_WIDGET
WidgetType constant.

See Also:
Constant Field Values

RIGHT_ARROW_WIDGET

public static final int RIGHT_ARROW_WIDGET
WidgetType constant.

See Also:
Constant Field Values

UP_ARROW_WIDGET

public static final int UP_ARROW_WIDGET
WidgetType constant.

See Also:
Constant Field Values

DOWN_ARROW_WIDGET

public static final int DOWN_ARROW_WIDGET
WidgetType constant.

See Also:
Constant Field Values

HORIZONTAL_SCALE_WIDGET

public static final int HORIZONTAL_SCALE_WIDGET
WidgetType constant.

See Also:
Constant Field Values

VERTICAL_SCALE_WIDGET

public static final int VERTICAL_SCALE_WIDGET
WidgetType constant.

See Also:
Constant Field Values

HORIZONTAL_SCROLL_WIDGET

public static final int HORIZONTAL_SCROLL_WIDGET
WidgetType constant.

See Also:
Constant Field Values

VERTICAL_SCROLL_WIDGET

public static final int VERTICAL_SCROLL_WIDGET
WidgetType constant.

See Also:
Constant Field Values

MENU_BAR_WIDGET

public static final int MENU_BAR_WIDGET
WidgetType constant.

See Also:
Constant Field Values

MS_FRAME_WIDGET

public static final int MS_FRAME_WIDGET
WidgetType constant.

See Also:
Constant Field Values

TEXT_WIDGET

public static final int TEXT_WIDGET
WidgetType constant.

See Also:
Constant Field Values

TEXT_EDIT_WIDGET

public static final int TEXT_EDIT_WIDGET
WidgetType constant.

See Also:
Constant Field Values

LABEL_WIDGET

public static final int LABEL_WIDGET
WidgetType constant.

See Also:
Constant Field Values

OPTION_MENU_WIDGET

public static final int OPTION_MENU_WIDGET
WidgetType constant.

See Also:
Constant Field Values

PULL_DOWN_MENU_WIDGET

public static final int PULL_DOWN_MENU_WIDGET
WidgetType constant.

See Also:
Constant Field Values

VERTICAL_SEPARATOR_WIDGET

public static final int VERTICAL_SEPARATOR_WIDGET
WidgetType constant.

See Also:
Constant Field Values

HORIZONTAL_SEPARATOR_WIDGET

public static final int HORIZONTAL_SEPARATOR_WIDGET
WidgetType constant.

See Also:
Constant Field Values

LIST_WIDGET

public static final int LIST_WIDGET
WidgetType constant.

See Also:
Constant Field Values

MULTI_LIST_WIDGET

public static final int MULTI_LIST_WIDGET
See Also:
Constant Field Values

EXT_LIST_WIDGET

public static final int EXT_LIST_WIDGET
See Also:
Constant Field Values

DIALOG_AREA_WIDGET

public static final int DIALOG_AREA_WIDGET
See Also:
Constant Field Values

NO_TOP_SHELL

public static final int NO_TOP_SHELL
ShellType constant.

See Also:
Constant Field Values

DIALOG_SHELL

public static final int DIALOG_SHELL
ShellType constant.

See Also:
Constant Field Values

APPLICATION_SHELL

public static final int APPLICATION_SHELL
ShellType constant.

See Also:
Constant Field Values

SHADOW_OUT

public static final int SHADOW_OUT
ShadowType constant.

See Also:
Constant Field Values

SHADOW_IN

public static final int SHADOW_IN
ShadowType constant.

See Also:
Constant Field Values

NO_ZOOM_MODE

public static final int NO_ZOOM_MODE
ZoomMode constant.

See Also:
Constant Field Values

ZOOM_TO_MODE

public static final int ZOOM_TO_MODE
ZoomMode constant.

See Also:
Constant Field Values

PAN_DRAG_MODE

public static final int PAN_DRAG_MODE
ZoomMode constant.

See Also:
Constant Field Values

SCREEN_COORD

public static final int SCREEN_COORD
Coordinate type constant for transforming objects.

See Also:
Constant Field Values

PARENT_COORD

public static final int PARENT_COORD
Coordinate type constant for transforming objects.

See Also:
Constant Field Values

OBJECT_COORD

public static final int OBJECT_COORD
Coordinate type constant for transforming objects.

See Also:
Constant Field Values

WORLD_COORD_SYSTEM

public static final int WORLD_COORD_SYSTEM
Drawing coordinate system type constant.

See Also:
Constant Field Values

SCREEN_COORD_SYSTEM

public static final int SCREEN_COORD_SYSTEM
Drawing coordinate system type constant.

See Also:
Constant Field Values

FLIPPED_SCREEN_COORD_SYSTEM

public static final int FLIPPED_SCREEN_COORD_SYSTEM
Drawing coordinate system type constant.

See Also:
Constant Field Values

SCREEN_CENTER_COORD_SYSTEM

public static final int SCREEN_CENTER_COORD_SYSTEM
Drawing coordinate system type constant.

See Also:
Constant Field Values

INHERIT_COORD_SYSTEM

public static final int INHERIT_COORD_SYSTEM
Object coordinate system type constant.

See Also:
Constant Field Values

ABS_SCREEN_COORD_SYSTEM

public static final int ABS_SCREEN_COORD_SYSTEM
Object coordinate system type constant.

See Also:
Constant Field Values

ABS_FLIPPED_SCREEN_COORD_SYSTEM

public static final int ABS_FLIPPED_SCREEN_COORD_SYSTEM
Object coordinate system type constant.

See Also:
Constant Field Values

PAN_X

public static final int PAN_X
Pan type constant.

See Also:
Constant Field Values

PAN_Y

public static final int PAN_Y
See Also:
Constant Field Values

PAN_XY

public static final int PAN_XY
See Also:
Constant Field Values

NO_GRADIENT

public static final int NO_GRADIENT
GradientType constant.

See Also:
Constant Field Values

LINEAR

public static final int LINEAR
GradientType constant.

See Also:
Constant Field Values

INVERSED_LINEAR

public static final int INVERSED_LINEAR
GradientType constant.

See Also:
Constant Field Values

LINEAR2

public static final int LINEAR2
GradientType constant.

See Also:
Constant Field Values

INVERSED_LINEAR2

public static final int INVERSED_LINEAR2
GradientType constant.

See Also:
Constant Field Values

CONICAL

public static final int CONICAL
GradientType constant.

See Also:
Constant Field Values

INVERSED_CONICAL

public static final int INVERSED_CONICAL
GradientType constant.

See Also:
Constant Field Values

SPHERICAL

public static final int SPHERICAL
GradientType constant.

See Also:
Constant Field Values

INVERSED_SPHERICAL

public static final int INVERSED_SPHERICAL
GradientType constant.

See Also:
Constant Field Values

ELLIPTICAL

public static final int ELLIPTICAL
GradientType constant.

See Also:
Constant Field Values

INVERSED_ELLIPTICAL

public static final int INVERSED_ELLIPTICAL
GradientType constant.

See Also:
Constant Field Values

LINE_WIDTH_GRADIENT

public static final int LINE_WIDTH_GRADIENT
GradientType constant.

See Also:
Constant Field Values

INVERSED_LINE_WIDTH_GRADIENT

public static final int INVERSED_LINE_WIDTH_GRADIENT
GradientType constant.

See Also:
Constant Field Values

NO_ARROW

public static final int NO_ARROW
ArrowType constant.

See Also:
Constant Field Values

START_ARROW

public static final int START_ARROW
ArrowType constant.

See Also:
Constant Field Values

END_ARROW

public static final int END_ARROW
ArrowType constant.

See Also:
Constant Field Values

START_END_ARROW

public static final int START_END_ARROW
ArrowType constant.

See Also:
Constant Field Values

MIDDLE_ARROW

public static final int MIDDLE_ARROW
ArrowType constant.

See Also:
Constant Field Values

MIDDLE_INVERSED_ARROW

public static final int MIDDLE_INVERSED_ARROW
ArrowType constant.

See Also:
Constant Field Values

START_FILL_ARROW

public static final int START_FILL_ARROW
ArrowType constant.

See Also:
Constant Field Values

END_FILL_ARROW

public static final int END_FILL_ARROW
ArrowType constant.

See Also:
Constant Field Values

START_END_FILL_ARROW

public static final int START_END_FILL_ARROW
ArrowType constant.

See Also:
Constant Field Values

MIDDLE_FILL_ARROW

public static final int MIDDLE_FILL_ARROW
ArrowType constant.

See Also:
Constant Field Values

MIDDLE_INVERSED_FILL_ARROW

public static final int MIDDLE_INVERSED_FILL_ARROW
ArrowType constant.

See Also:
Constant Field Values

ARROW_POSITION_MASK

public static final int ARROW_POSITION_MASK
Arrow position mask constant.

See Also:
Constant Field Values

ARROW_TYPE_MASK

public static final int ARROW_TYPE_MASK
Arrow type mask constant.

See Also:
Constant Field Values

START_APOS

public static final int START_APOS
Arrow position constant.

See Also:
Constant Field Values

END_APOS

public static final int END_APOS
Arrow position constant.

See Also:
Constant Field Values

START_END_APOS

public static final int START_END_APOS
Arrow position constant.

See Also:
Constant Field Values

MIDDLE_APOS

public static final int MIDDLE_APOS
Arrow position constant.

See Also:
Constant Field Values

MIDDLE_INVERSED_APOS

public static final int MIDDLE_INVERSED_APOS
Arrow position constant.

See Also:
Constant Field Values

LINE_ATYPE

public static final int LINE_ATYPE
Arrow type constant.

See Also:
Constant Field Values

FILL_ATYPE

public static final int FILL_ATYPE
Arrow type constant.

See Also:
Constant Field Values

FILL_EDGE_ATYPE

public static final int FILL_EDGE_ATYPE
Arrow type constant.

See Also:
Constant Field Values

AUTO_CONVEX

public static final int AUTO_CONVEX
Convex type constants

See Also:
Constant Field Values

CONVEX

public static final int CONVEX
See Also:
Constant Field Values

NON_CONVEX

public static final int NON_CONVEX
See Also:
Constant Field Values

ANTI_ALIASING_OFF

public static final int ANTI_ALIASING_OFF
Anti-aliasing constants

See Also:
Constant Field Values

ANTI_ALIASING_INT

public static final int ANTI_ALIASING_INT
See Also:
Constant Field Values

ANTI_ALIASING_DBL

public static final int ANTI_ALIASING_DBL
See Also:
Constant Field Values

ANTI_ALIASING_UNSET

public static final int ANTI_ALIASING_UNSET
See Also:
Constant Field Values

MOVE_SELECTION

public static final int MOVE_SELECTION
Event types for creating custom event selection messages. Return move custom selection events.

See Also:
Constant Field Values

CLICK_SELECTION

public static final int CLICK_SELECTION
Event types for creating custom event selection messages. Return click custom selection events.

See Also:
Constant Field Values

TOOLTIP_SELECTION

public static final int TOOLTIP_SELECTION
Event types for creating custom event selection messages. Return click custom selection events.

See Also:
Constant Field Values

NO_MOUSE_EVENTS

public static final int NO_MOUSE_EVENTS
Viewport's ProcessMouse mask Disables all event processing if no other masks are selected.

See Also:
Constant Field Values

MOUSE_OVER_SELECTION

public static final int MOUSE_OVER_SELECTION
Viewport's ProcessMouse mask Enables object selection on mouse over.

See Also:
Constant Field Values

MOUSE_OVER_TOOLTIP

public static final int MOUSE_OVER_TOOLTIP
Viewport's ProcessMouse mask Enables object tooltips on mouse over when used together with MOUSE_OVER_SELECTION.

See Also:
Constant Field Values

MOUSE_CLICK

public static final int MOUSE_CLICK
Viewport's ProcessMouse mask Enables object selection on mouse click.

See Also:
Constant Field Values

NAMED_TOOLTIP

public static final int NAMED_TOOLTIP
Viewport's ProcessMouse mask Forces using object names instead of TooltipString resources for tooltips.

See Also:
Constant Field Values

MOUSE_MOVE_AND_CLICK

public static final int MOUSE_MOVE_AND_CLICK
Viewport's ProcessMouse convenience constant that matches ProcessMouse's option in the Builder. Enables object selection on mouse click and mouse over, as well as object tooltips on mouse over.

See Also:
Constant Field Values

MOUSE_MOVE_AND_CLICK_NAMED

public static final int MOUSE_MOVE_AND_CLICK_NAMED
Viewport's ProcessMouse convenience constant that matches ProcessMouse's option in the Builder. Same as MOUSE_MOVE_AND_CLICK, but uses object names for tooltips.

See Also:
Constant Field Values

ALIGN_LEFT

public static final int ALIGN_LEFT
Layout action for LayoutObjects method.

See Also:
Constant Field Values

ALIGN_RIGHT

public static final int ALIGN_RIGHT
Layout action for LayoutObjects method.

See Also:
Constant Field Values

ALIGN_HCENTER

public static final int ALIGN_HCENTER
Layout action for LayoutObjects method.

See Also:
Constant Field Values

ALIGN_TOP

public static final int ALIGN_TOP
Layout action for LayoutObjects method.

See Also:
Constant Field Values

ALIGN_BOTTOM

public static final int ALIGN_BOTTOM
Layout action for LayoutObjects method.

See Also:
Constant Field Values

ALIGN_VCENTER

public static final int ALIGN_VCENTER
Layout action for LayoutObjects method.

See Also:
Constant Field Values

SET_EQUAL_VSIZE

public static final int SET_EQUAL_VSIZE
Layout action for LayoutObjects method: set same height.

See Also:
Constant Field Values

SET_EQUAL_HSIZE

public static final int SET_EQUAL_HSIZE
Layout action for LayoutObjects method: set same width.

See Also:
Constant Field Values

SET_EQUAL_SIZE

public static final int SET_EQUAL_SIZE
Layout action for LayoutObjects method: set same width and height.

See Also:
Constant Field Values

SET_EQUAL_VDISTANCE

public static final int SET_EQUAL_VDISTANCE
Layout action for LayoutObjects method: distribute (centers) evenly down.

See Also:
Constant Field Values

SET_EQUAL_HDISTANCE

public static final int SET_EQUAL_HDISTANCE
Layout action for LayoutObjects method: distribute (centers) evenly across.

See Also:
Constant Field Values

SET_EQUAL_VSPACE

public static final int SET_EQUAL_VSPACE
Layout action for LayoutObjects method: space evenly down.

See Also:
Constant Field Values

SET_EQUAL_HSPACE

public static final int SET_EQUAL_HSPACE
Layout action for LayoutObjects method: space evenly across.

See Also:
Constant Field Values

SET_VSIZE

public static final int SET_VSIZE
Layout action for LayoutObjects method: set height.

See Also:
Constant Field Values

SET_HSIZE

public static final int SET_HSIZE
Layout action for LayoutObjects method: set width.

See Also:
Constant Field Values

SET_VDISTANCE

public static final int SET_VDISTANCE
Layout action for LayoutObjects method: set vertical distance (between centers).

See Also:
Constant Field Values

SET_HDISTANCE

public static final int SET_HDISTANCE
Layout action for LayoutObjects method: set horizontal distance (between centers).

See Also:
Constant Field Values

SET_VSPACE

public static final int SET_VSPACE
Layout action for LayoutObjects method: set vertical space (between objects).

See Also:
Constant Field Values

SET_HSPACE

public static final int SET_HSPACE
Layout action for LayoutObjects method: set horizontal space (between objects).

See Also:
Constant Field Values
Constructor Detail

GlgObject

public GlgObject()
Method Detail

SetErrorHandler

public static GlgErrorHandler SetErrorHandler(GlgErrorHandler new_handler)
Installs a custom error handler.

Returns:
Previous handler

SetupHierarchy

public void SetupHierarchy()
Sets up object hierarchy.


ResetHierarchy

public void ResetHierarchy()
Resets object hierarchy.


InitialDraw

public void InitialDraw()
Draws a viewport object for the first time.


LoadObject

public static GlgObject LoadObject(java.lang.String filename,
                                   int medium_type)
Loads object from a file or URL.

Parameters:
filename - Defines a drawing file or URL.
medium_type - FILE or URL constant
Returns:
Loaded object or null if load fails.

LoadWidget

public static GlgObject LoadWidget(java.lang.String filename,
                                   int medium_type)
Loads a viewport named "$Widget" from a file or URL.

Parameters:
filename - Defines a drawing file or URL.
medium_type - FILE or URL constant
Returns:
Loaded viewport or null if load fails.

LoadWidget

public static GlgObject LoadWidget(GlgObject object)
Finds a viewport named "$Widget" inside an object and returns it.

Parameters:
object - An object containing $Widget viewport
Returns:
Viewport or null if search fails.

Update

public boolean Update()
Updates the drawing with the latest resource values.


Reset

public boolean Reset()
Resets the object hierarchy.


Print

public boolean Print(java.lang.String file,
                     double x,
                     double y,
                     double width,
                     double height,
                     boolean portrait,
                     boolean stretch)
Prints the viewport's drawing and saves it in a PostScript file.

Parameters:
file - Filename
x - The X coordinate of the lower left corner of the postcript output on a page in GLG coordinates [-1000;1000].
y - The Y coordinate of the lower left corner of the postcript output on a page in GLG coordinates [-1000;1000].
width - The width of the postcript output on a page in GLG coordinates [-1000;1000].
height - The height of the postcript output on a page in GLG coordinates [-1000;1000].
portrait - Orientation of the postscript output: true for portrait
stretch - Preserving X/Y ratio: true to stretch, false to preserve.

NativePrint

public boolean NativePrint(java.awt.Graphics graphics)
Prints the viewport drawing into the print graphics using viewport components's printAll method.

Parameters:
graphics - Print graphics

CreateImage

public java.awt.Image CreateImage(java.lang.String res_name)
Creates an image of the viewport's graphics clipped to the viewport's visible area.

Returns:
Image (Java1) or BufferedImage (Java2).

CreateImageCustom

public java.awt.Image CreateImageCustom(java.lang.String res_name,
                                        java.awt.Rectangle image_area,
                                        int gap)
Creates an unclipped image of the viewport's graphics within the given rectangular area in screen coordinates. If rectangle is null, the bounding box of the drawing extended by the specified gap is used to define the area whose image to generate.

Returns:
Image (Java1) or BufferedImage (Java2).

CreateIndexedName

public static java.lang.String CreateIndexedName(java.lang.String template_name,
                                                 int resource_index)
Creates an indexed name by inserting a number into the first % character of the name template.

Returns:
Created name

ConcatResNames

public static java.lang.String ConcatResNames(java.lang.String resource_name1,
                                              java.lang.String resource_name2)
Concatenates two resource names, inserting the "/" separator if necessary.

Parameters:
resource_name1 - Resource path
resource_name2 - Resource name
Returns:
Created name

SetDResource

public boolean SetDResource(java.lang.String resource_name,
                            double d_value)
Sets value of a D (double) resource.

Parameters:
resource_name - Resource name
d_value - Resource value

SetDResource

public boolean SetDResource(java.lang.String resource_name,
                            double d_value,
                            boolean if_changed)
Sets value of a D (double) resource.

Parameters:
resource_name - Resource name
d_value - Resource value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

SetDResource

public boolean SetDResource(java.lang.String resource_name,
                            java.lang.Double d_value)
Sets value of a D (double) resource.

Parameters:
resource_name - Resource name
d_value - Resource value

SetDResource

public boolean SetDResource(java.lang.String resource_name,
                            java.lang.Double d_value,
                            boolean if_changed)
Sets value of a D (double) resource.

Parameters:
resource_name - Resource name
d_value - Resource value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

GetDResource

public java.lang.Double GetDResource(java.lang.String resource_name)
Returns value of a D (double) resource.

Parameters:
resource_name - Resource name
Returns:
Resource value

SetGResource

public boolean SetGResource(java.lang.String resource_name,
                            double g_value1,
                            double g_value2,
                            double g_value3)
Sets value of a G (geometrical or color) resource.

Parameters:
resource_name - Resource name
g_value1 - the first value of the XYZ or RGB value triplet.
g_value2 - the second value of the XYZ or RGB value triplet.
g_value3 - the third value of the XYZ or RGB value triplet.

SetGResource

public boolean SetGResource(java.lang.String resource_name,
                            double g_value1,
                            double g_value2,
                            double g_value3,
                            boolean if_changed)
Sets value of a G (geometrical or color) resource.

Parameters:
resource_name - Resource name
g_value1 - the first value of the XYZ or RGB value triplet.
g_value2 - the second value of the XYZ or RGB value triplet.
g_value3 - the third value of the XYZ or RGB value triplet.
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

SetGResource

public boolean SetGResource(java.lang.String resource_name,
                            GlgPoint g_value)
Sets value of a G (geometrical or color) resource.

Parameters:
resource_name - Resource name
g_value - XYZ or RGB resource values

SetGResource

public boolean SetGResource(java.lang.String resource_name,
                            GlgPoint g_value,
                            boolean if_changed)
Sets value of a G (geometrical or color) resource.

Parameters:
resource_name - Resource name
g_value - XYZ or RGB resource values
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

GetGResource

public GlgPoint GetGResource(java.lang.String resource_name)
Returns value of a G (geometrical or color) resource.

Parameters:
resource_name - Resource name
Returns:
Resource value

SetSResource

public boolean SetSResource(java.lang.String resource_name,
                            java.lang.String s_value)
Sets value of an S (string) resource.

Parameters:
resource_name - Resource name
s_value - Resource value

SetSResource

public boolean SetSResource(java.lang.String resource_name,
                            java.lang.String s_value,
                            boolean if_changed)
Sets value of an S (string) resource.

Parameters:
resource_name - Resource name
s_value - Resource value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

GetSResource

public java.lang.String GetSResource(java.lang.String resource_name)
Returns value of an S (string) resource.

Parameters:
resource_name - Resource name
Returns:
Resource value

SetSResourceFromD

public boolean SetSResourceFromD(java.lang.String resource_name,
                                 java.lang.String format,
                                 double d_value)
Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters:
resource_name - Resource name
format - C-style format (for example, "%.2lf")
d_value - Value

SetSResourceFromD

public boolean SetSResourceFromD(java.lang.String resource_name,
                                 java.lang.String format,
                                 double d_value,
                                 boolean if_changed)
Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters:
resource_name - Resource name
format - C-style format (for example, "%.2lf")
d_value - Value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

SetSResourceFromD

public boolean SetSResourceFromD(java.lang.String resource_name,
                                 java.lang.String format,
                                 java.lang.Double d_value)
Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters:
resource_name - Resource name
format - C-style format (for example, "%.2lf")
d_value - Value

SetSResourceFromD

public boolean SetSResourceFromD(java.lang.String resource_name,
                                 java.lang.String format,
                                 java.lang.Double d_value,
                                 boolean if_changed)
Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters:
resource_name - Resource name
format - C-style format (for example, "%.2lf")
d_value - Value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

SetResourceFromObject

public boolean SetResourceFromObject(java.lang.String resource_name,
                                     GlgObject o_value)
Sets value of the data or matrix resource to the value of the data object.

Parameters:
resource_name - Resource name
o_value - Glg data object proving a value (must match resource's data type)

SetResourceFromObject

public boolean SetResourceFromObject(java.lang.String resource_name,
                                     GlgObject o_value,
                                     boolean if_changed)
Sets value of the data or matrix resource to the value of the data object.

Parameters:
resource_name - Resource name
o_value - Glg data object proving a value (must match resource's data type)
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

HasResourceObject

public boolean HasResourceObject(java.lang.String resource_name)
Checks for the existence of the resource object

Parameters:
resource_name - Resource name
Returns:
true on success

SetDTag

public boolean SetDTag(java.lang.String tag_name,
                       double d_value,
                       boolean if_changed)
Sets value of a D (double) tag.

Parameters:
tag_name - Tag name
d_value - Tag value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

SetDTag

public boolean SetDTag(java.lang.String tag_name,
                       java.lang.Double d_value,
                       boolean if_changed)
Sets value of a D (double) tag.

Parameters:
tag_name - Tag name
d_value - Tag value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

GetDTag

public java.lang.Double GetDTag(java.lang.String tag_name)
Returns value of a D (double) tag.

Parameters:
tag_name - Tag name
Returns:
Tag value

SetGTag

public boolean SetGTag(java.lang.String tag_name,
                       double g_value1,
                       double g_value2,
                       double g_value3,
                       boolean if_changed)
Sets value of a G (geometrical or color) tag.

Parameters:
tag_name - Tag name
g_value1 - the first value of the XYZ or RGB value triplet.
g_value2 - the second value of the XYZ or RGB value triplet.
g_value3 - the third value of the XYZ or RGB value triplet.
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

SetGTag

public boolean SetGTag(java.lang.String tag_name,
                       GlgPoint g_value,
                       boolean if_changed)
Sets value of a G (geometrical or color) tag.

Parameters:
tag_name - Tag name
g_value - XYZ or RGB tag values
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

GetGTag

public GlgPoint GetGTag(java.lang.String tag_name)
Returns value of a G (geometrical or color) tag.

Parameters:
tag_name - Tag name
Returns:
Tag value

SetSTag

public boolean SetSTag(java.lang.String tag_name,
                       java.lang.String s_value,
                       boolean if_changed)
Sets value of an S (string) tag.

Parameters:
tag_name - Tag name
s_value - Tag value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

GetSTag

public java.lang.String GetSTag(java.lang.String tag_name)
Returns value of an S (string) tag.

Parameters:
tag_name - Tag name
Returns:
Tag value

SetSTagFromD

public boolean SetSTagFromD(java.lang.String tag_name,
                            java.lang.String format,
                            double d_value,
                            boolean if_changed)
Sets value of an S (string) tag from a double value, converting the value into a string using a C-style format.

Parameters:
tag_name - Tag name
format - C-style format (for example, "%.2lf")
d_value - Value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

SetSTagFromD

public boolean SetSTagFromD(java.lang.String tag_name,
                            java.lang.String format,
                            java.lang.Double d_value,
                            boolean if_changed)
Sets value of an S (string) tag from a double value, converting the value into a string using a C-style format.

Parameters:
tag_name - Tag name
format - C-style format (for example, "%.2lf")
d_value - Value
if_changed - If set to true, the graphics will be redrawn only if the new tag value is different from the old one.

HasTagSource

public boolean HasTagSource(java.lang.String tag_source)
Checks for an existence of a tag object with the given tag source.

Parameters:
tag_source - Tag source
Returns:
true on success

HasTagName

public boolean HasTagName(java.lang.String tag_name)
Checks for an existence of a tag object with the given tag name.

Parameters:
tag_name - Tag name
Returns:
true on success

CreateTagList

public GlgObject CreateTagList(boolean unique_tag_sources)
Returns a list of all tags defined in the object

Parameters:
unique_tag_sources - If set to true, only the first encountered tag will be reported for tags with the same tag sources.

Init

public static void Init()
Initializes Glg Toolkit.


Terminate

public static void Terminate()
Destroys Glg Toolkit's internal objects.


Sync

public static boolean Sync()
Flushes the graphics output.


AddListener

public void AddListener(int type,
                        java.lang.Object callback)
Adds listener for GLG events to a viewport object.

Parameters:
type - Callback type: SELECT_CB, INPUT_CB. TRACE_CB or TRACE2_CB.
callback - Listener of an appropriate type (GlgInputListener, GlgSelectListener or GlgTraceListener).

Sleep

public static boolean Sleep(long milisec)
Sleeps for the specified number of milliseconds.


Bell

public static void Bell()
Emits an audio beep.


Rand

public static double Rand(double low,
                          double high)
Returns a random number in the specified range.


Printf

public static java.lang.String Printf(java.lang.String format,
                                      double value)
Utilty function: C-style printf.


Printf

public static java.lang.String Printf(java.lang.String format,
                                      int value)
Utilty function: C-style printf.


Printf

public static java.lang.String Printf(java.lang.String format,
                                      java.lang.String value)
Utilty function: C-style printf.


SetBrowserObject

public static void SetBrowserObject(GlgObject browser,
                                    GlgObject object)
Sets an object to be browsed by the Glg Resource Browser widget.

Parameters:
browser - Viewport of the resource browser widget
object - Object to browse

SetZoom

public boolean SetZoom(java.lang.String res_name,
                       char type,
                       double value)
Programmatic interface for the integrated zoom and pan features. Zooms or pans the viewport by the specified amount. If the res_name parameter is not null, the child viewport of the object with the name specified by the res_name parameter is zoomed or panned. The type may be one of the following: 'u' - pan up (default amount is 1/2 of the window height). 'd' - pan down (default amount is 1/2 of the window height). 'l' - pan left (default amount is 1/2 of the window width). 'r' - pan right (default amount is 1/2 of the window width). 'i' - zoom in (default zoom scale is 2 ). 'o' - zoom out (default zoom scale is 1/2 ). 'U' - pan the drawing all the way up 'D' - pan the drawing all the way down 'L' - pan the drawing all the way to the left 'R' - pan the drawing all the way to the right 'x' - pan horizontally by the distance in screen coordinates 'y' - pan vertically by the distance in screen coordinates 'X' - pan horizontally by the distance in world coordinates 'Y' - pan vertically by the distance in world coordinates 'f' - fit the drawing to the window 'n' - reset any zoom and pan 't' - start ZoomTo mode 'e' - abort ZoomTo mode in progress (if any) 'g' - if the mouse points at the GIS object, set the GIS zoom mode for that object. 'G' - reset the GIS zoom mode. The value specifies the amount to zoom or pan by (when the value of 0 is passed, the default value is used). For pan operations, the value is expressed in the fractions of the screen size (for example, using 2/3 as the value will pan by 2/3 of the screen width or height). For zoom operations, the value defines the zoom scale (for example, using 5 as the value will zoom in or out by the factor of 5). The value is ignored in Reset, Start ZoomTo or Abort ZoomTo modes. The method returns false if the zoom factor or pan amount is too big and would result in the overflow of the integer values used for drawing primitives by the windowing system, otherwise true is returned.


SetGISZoom

public boolean SetGISZoom(java.lang.String res_name,
                          GlgObject gis_object,
                          java.lang.String gis_name)
Sets the viewport's GIS zoom mode and selects the GIS object to be zoomed.

Parameters:
res_name - The name of a child viewport to zoom, or null to zoom the viewport itself.
gis_object - The GIS object to be zoomed if gis_name==null, or a parent of the GIS object if gis_name!=null.
gis_name - The resource name of the GIS object to be zoomed relative to the parent specified by the gis_object parameter.

GISGetElevation

public java.lang.Double GISGetElevation(java.lang.String res_name,
                                        java.lang.String layer_name,
                                        double lon,
                                        double lat)
Queries map server elevation data.

Parameters:
res_name - The name of a child GIS object to query or or null to query the object itself.
layer_name - Name of the elevation layer to query
lat - The Lat coordinate of the point
lon - The Lon coordinate of the point
Returns:
elevation value if elevation data for the point exist.

GISConvert

public boolean GISConvert(java.lang.String res_name,
                          int coord_type,
                          boolean coord_to_lat_lon,
                          GlgPoint in_point,
                          GlgPoint out_point)
Performs coordinate conversion between the GIS to GLG coordinate systems using the current settings of the GIS object.

Parameters:
coord_type - Coordinate system to use, SCREEN_COORD or OBJECT_COORD. For OBJECT_COORD, the world coordinate system of the GIS object is used.
coord_to_lat_lon - Conversion type: x/y to lon/lat if true, lon/lat to x/y if false.
in_point - Input values (x/y in the selected coordinate system or lon/lat).
out_point - Converted output values (x/y in the selected coordinate system or or lon/lat).
Returns:
true if coordinate conversion suceeded with no errors.

GlmConvert

public static void GlmConvert(int projection,
                              boolean stretch,
                              int coord_type,
                              boolean coord_to_lat_lon,
                              GlgPoint center,
                              GlgPoint extent,
                              double min_x,
                              double max_x,
                              double min_y,
                              double max_y,
                              GlgPoint in_point,
                              GlgPoint out_point)

GlmConvert

public static void GlmConvert(int projection,
                              boolean stretch,
                              int coord_type,
                              boolean coord_to_lat_lon,
                              GlgPoint center,
                              GlgPoint extent,
                              double angle,
                              double min_x,
                              double max_x,
                              double min_y,
                              double max_y,
                              GlgPoint in_point,
                              GlgPoint out_point)
Low-level interface to the map server; performs GIS coordinate conversion.

Parameters:
projection - RECTANGULAR or ORTHOGRAPHIS
stretch - If false, the map extent is adjusted to preserve X/Y ratio (for SCREEN_COORD coordinate type only).
coord_type - Coordinate system to use.
coord_to_lat_lon - Conversion type: x/y to lon/lat if true, lon/lat to x/y if false.
center - Center of the map in lat/lon.
extent - Extent of the map in lat/lon (rectangular projection) or in meters for orthogonal progection.
angle - Angle of the map rotation.
min_x - The extent of the GIS object in the selected coordinate system.
min_y - The extent of the GIS object in the selected coordinate system.
max_x - The extent of the GIS object in the selected coordinate system.
max_y - The extent of the GIS object in the selected coordinate system.
in_point - Input values (x/y in the selected coordinate system or lon/lat).
out_point - Converted output values (x/y in the selected coordinate system or or lon/lat).

ExportStrings

public int ExportStrings(java.lang.String filename,
                         int medium_type,
                         char separator1,
                         char separator2,
                         java.lang.String encoding)
Exports all strings defined in the (drawing) object.

Parameters:
filename - Defines the file to save exported strings.
medium_type - FILE or URL constant
separator1 - Defines the first separator character
separator2 - Defines the second separator character
encoding - Defines character encoding to use for writing the string file. If null, default encoding is used.
Returns:
Number of exported strings or -1 if error.

ImportStrings

public int ImportStrings(java.lang.String filename,
                         int medium_type,
                         boolean verbose,
                         java.lang.String encoding)
Imports strings from a file or URL and converts matching strings of the (drawing) object.

Parameters:
filename - Defines a drawing file or URL.
medium_type - FILE or URL constant
verbose - If set to true, generates a warning for each drawing strings that is not converted.
encoding - Defines character encoding used in the string file. If null, default encoding is used.
Returns:
Number of converted strings or -1 if error.

ExportTags

public int ExportTags(java.lang.String filename,
                      int medium_type,
                      char separator1,
                      char separator2,
                      java.lang.String encoding)
Exports all tag names defined in the (drawing) object.

Parameters:
filename - Defines the file to save exported tag names.
medium_type - FILE or URL constant
separator1 - Defines the first separator character
separator2 - Defines the second separator character
encoding - Defines character encoding to use for writing the tags file. If null, default encoding is used.
Returns:
Number of exported tags or -1 if error.

ImportTags

public int ImportTags(java.lang.String filename,
                      int medium_type,
                      boolean verbose,
                      java.lang.String encoding)
Imports tag names from a file or URL and converts matching tags of the (drawing) object.

Parameters:
filename - Defines a drawing file or URL.
medium_type - FILE or URL constant
verbose - If set to true, generates a warning for each drawing tag that is not converted.
encoding - Defines character encoding used in the tag file. If null, default encoding is used.
Returns:
Number of converted tags or -1 if error.

SendMessage

public java.lang.Object SendMessage(java.lang.String res_name,
                                    java.lang.String message,
                                    java.lang.Object param1,
                                    java.lang.Object param2,
                                    java.lang.Object param3,
                                    java.lang.Object param4)
Sends a message to object.

Parameters:
res_name - The name of a child object to send the message to, or null to send the the message to the object.
message - Message type.
param1 - Message-specific parameter
param2 - Message-specific parameter
param3 - Message-specific parameter
param4 - Message-specific parameter
Returns:
Return value of the message.

CreateSelectionNames

public static GlgObject CreateSelectionNames(GlgObject top_vp,
                                             GlgCube rectangle,
                                             GlgObject selected_vp)
ADVANCED: Creates an array of objects selected by a rectangle.

Parameters:
top_vp - The top viewport of the drawing
rectangle - Rectangle in screen coordinates of the selected_vp.
selected_vp - The selection viewport in which rectangle coordinates are defined.
Returns:
Array of names of all objects selected by the rectangle.

CreateSelectionNames

public static GlgObject CreateSelectionNames(java.awt.event.MouseEvent event,
                                             int delta,
                                             GlgObject top_vp,
                                             GlgObject selected_vp)
ADVANCED: Creates object selection from a mouse event. This method is useful for use with the TraceListener to implement custom selection logic based on the mouse events.

Parameters:
event - Mouse event
delta - Mouse sensitivity in pixels
top_vp - The top viewport of the drawing
selected_vp - The viewport of the mouse event.
Returns:
Array of names of all objects selected by the mouse event.

CreateSelectionMessage

public static GlgObject CreateSelectionMessage(GlgObject top_vp,
                                               GlgCube rectangle,
                                               GlgObject selected_vp,
                                               int selection_type,
                                               int button)
ADVANCED: Alternative interface to custom events. Creates and returns a custom event message selected by the specified rectangle. The message is the same as the one received in the Input callback on mouse click or mouse over event. The rectangle is used to select an object with the custom event attached instead of the mouse event. The first selected custom event message is returned, or null if no objects with custom events were selected.

Parameters:
top_vp - The top viewport of the drawing
rectangle - Rectangle in screen coordinates of the selected_vp.
selected_vp - The selection viewport in which rectangle coordinates are defined.
selection_type - GlgObject.CLICK_SELECTION, GlgObject.MOVE_SELECTION or GlgObject.TOOLTIP_SELECTION.
button - selection button for click selection or 0.
Returns:
Custom event message object containing information about the selected object with the required type of the custom event.

HasJava2D

public static boolean HasJava2D()
Returns true if Java2D is supported by the JVM.


IsDemo

public static boolean IsDemo()
Returns true if trial version of the jar file is used.


ThrowExceptionOnError

public static void ThrowExceptionOnError(boolean user_error,
                                         boolean internal_error)
Controls throwing exceptions on errors. Use false as parameter values to avoid throwing exceptions.


SynchronizeImageLoading

public static boolean SynchronizeImageLoading(boolean synchronize)

SetImageSize

public void SetImageSize(int width,
                         int height)

GetImageWidth

public int GetImageWidth()

GetImageHeight

public int GetImageHeight()

CopyObject

public GlgObject CopyObject()
Creates a copy of an object using FULL_CLONE copy method.

Returns:
Object copy

CloneObject

public GlgObject CloneObject(int clone_type)
Creates and returns a copy of an object according to the clone_type. The WEAK_CLONE, STRONG_CLONE, FULL_CLONE or CONSTRAINED_CLONE clone types differ in the way they handle objects' Global flag settings. The SHALLOW_CLONE fills the returned group with elements of the original group without copying the elements.

Returns:
Object copy

SaveObject

public boolean SaveObject(java.lang.String filename)
Saves an object into a file.

Parameters:
filename - Filename

SaveObject

public boolean SaveObject(java.lang.Object media,
                          int media_type)
Saves an object into a stream.

Parameters:
media - The destination to save to (Stream)
media_type - Destination object type (GlgObject.STREAM)

SetElement

public boolean SetElement(int index,
                          java.lang.Object new_object)
Sets an element of a container to a new value. Generates an error message and returns false if the element with pos_index does not exist.

Parameters:
index - Index of the element
new_object - New value

AddObjectToTop

public boolean AddObjectToTop(java.lang.Object object)
Adds object to the top of the container.

Parameters:
object - Object to add

AddObjectToBottom

public boolean AddObjectToBottom(java.lang.Object object)
Adds object to the bottom of the container.

Parameters:
object - Object to add

AddObjectAt

public boolean AddObjectAt(java.lang.Object object,
                           int index)
Adds object to the container at the specified position.

Parameters:
object - Object to add
index - Position index

DeleteTopObject

public boolean DeleteTopObject()
Deletes first object from the container.


DeleteBottomObject

public boolean DeleteBottomObject()
Deletes last object from the container.


DeleteObject

public boolean DeleteObject(java.lang.Object object)
Deletes the object from the container.

Parameters:
object - Object to delete.
Returns:
true if the object was successfully deleted.

DeleteObjectAt

public boolean DeleteObjectAt(int index)
Deletes the object of the container at the specified position.

Parameters:
index - Index of the object to delete.

ContainsObject

public boolean ContainsObject(java.lang.Object object)
Checks if the object is contained by the container.

Parameters:
object - The object to search for.
Returns:
true if the object is contained in container.

GetElement

public java.lang.Object GetElement(int index)
Returns container's element at the specified position.

Parameters:
index - Position Index
Returns:
Container's element or null.

GetNamedObject

public GlgObject GetNamedObject(java.lang.String name)
Returns container's element with the specified name

Parameters:
name - The element's name
Returns:
Container's element or null if named element wasn't found.

GetIndex

public int GetIndex(java.lang.Object object)
Returns the index of the first occurrence of the object in the container

Parameters:
object - The object to search for.
Returns:
Object's index or -1 if the object wasn't found in the container.

GetStringIndex

public int GetStringIndex(java.lang.String string)
Returns the index of the first occurrence of the string in a string container

Parameters:
string - The string to search for.
Returns:
Object's index or -1 if the object wasn't found in the container.

SetStart

public void SetStart()
Initializes container for traversing. This function should be called before invoking the container's IterateExt method.


Iterate

public java.lang.Object Iterate()
Returns the next element of container.


GetSize

public int GetSize()
Returns container's size.


Inverse

public void Inverse()
Reverses the order of the objects in the container.


ReorderElement

public boolean ReorderElement(int current_index,
                              int new_index)
Moves the container's element from the old_index to the new_index position.

Parameters:
current_index - Index of the object to move.
new_index - Index of the new object position.
Returns:
false if indexes are out of range.

SetXform

public boolean SetXform(GlgObject xform)
Sets the object's transformation to a constrained copy of the xform parameter.

Parameters:
xform - Transformation to attach to the object.

GetResourceObject

public GlgObject GetResourceObject(java.lang.String resource_name)
Finds and returns a named resource or an attribute of the object.

Parameters:
resource_name - Resource name
Returns:
Resource or attribute object.

SetResourceObject

public boolean SetResourceObject(java.lang.String resource_name,
                                 GlgObject value)
Sets the new value of the object's attribute. This method is used for attaching Custom Property objects, aliases and history objects.

Parameters:
resource_name - Attribute name
value - GlgObject to attach.

GetResource

public java.lang.Object GetResource(java.lang.String resource_name)
Finds and returns a resource of an arbitrary type.

Parameters:
resource_name - Resource name
Returns:
Resource object.

SetResource

public boolean SetResource(java.lang.String resource_name,
                           java.lang.Object value)
Sets the new value of the object's attribute of Java Object type. This method is used for setting object's DataSlot attribute.

Parameters:
resource_name - Attribute name
value - Object to attach.

GetTagObject

public GlgObject GetTagObject(java.lang.String search_string,
                              boolean by_name,
                              boolean unique_tags,
                              boolean single_tag)
Finds named tags or a single tag.

Parameters:
search_string - Tag name or source, may contain '*' and '?' wildcards.
by_name - Search type: search for tag name if true, tag source if false.
unique_tags - If set to true, only one tag instance will be returned for each tag name.
single_tag - If set to true and no wildcards are used, the method returns the first found tag object with the specified name.
Returns:
A tag object (single_tag mode, no wildcards used) or an array of tags.

ConstrainObject

public boolean ConstrainObject(GlgObject to_attribute)
Constrains the attribute object.

Parameters:
to_attribute - The object to constrain to

UnconstrainObject

public boolean UnconstrainObject()
Unconstrains the attribute object.


SuspendObject

public GlgObject SuspendObject()
Suspends the object for editing. This function must be called before adding a transformation or constraining attributes of the object whose object hierarchy has been setup (the object has been drawn).

Returns:
Suspend information (GlgObject) to be used as a suspend_info parameter in a subsequent call to the ReleaseObject method.

ReleaseObject

public void ReleaseObject(GlgObject suspend_info)
Releases the object after suspending for editing.

Parameters:
suspend_info - Returned value of a previous call to SuspendObject

GetNumParents

public int GetNumParents()
ADVANCED: Returns the number of object's parents. Used to determine the type of the return value of the GetParentExt method.

Returns:
number object's parents

GetParent

public GlgObject GetParent()
ADVANCED: Returns object parent(s). The type of the return value may be determined by using GetNumParents method.

Returns:
objects' parent if the object has one parent. If object has more than one parent, returns an array of parents.

GetBox

public GlgCube GetBox()
ADVANCED: Returns object's 3D bounding box in screen coordinates. The box can be used for collision detection. The coordinates of the box are valid only after the object has been drawn.

Returns:
Bounding box

GetDrawingMatrix

public GlgObject GetDrawingMatrix()
ADVANCED: Returns the matrix object of the transformation used to draw the object on the screen.

Returns:
drawing matrix

CreateInversedMatrix

public GlgObject CreateInversedMatrix()
ADVANCED: Creates and returns a matrix inversed relative to this one.

Returns:
inversed matrix

TransformPoint

public void TransformPoint(GlgPoint in_point,
                           GlgPoint out_point)
ADVANCED: Transforms a point with this matrix object. Transforms the in_point with this matrix and places the result into the out_point.

Parameters:
in_point - Point to transform with the matrix
out_point - Point to receive transformed values

CreateSelection

public static GlgObject CreateSelection(GlgObject top_vp,
                                        GlgCube rectangle,
                                        GlgObject selected_vp)
ADVANCED: Creates an array of objects selected by a rectangle. This is the same as the corresponding CreateSelectionNames, but returns an array of selected objects on the bottom of the hierarchy instead of an array of names.

Parameters:
top_vp - The top viewport of the drawing
rectangle - Rectangle in screen coordinates of the selected_vp.
selected_vp - The selection viewport.
Returns:
Array of objects selected by the rectangle.

CreateSelection

public static GlgObject CreateSelection(java.awt.event.MouseEvent event,
                                        int delta,
                                        GlgObject top_vp,
                                        GlgObject selected_vp)
ADVANCED: Creates object selection from a mouse event. This is the same as the corresponding CreateSelectionNames, but returns an array of selected objects on the bottom of the hierarchy instead of an array of names.

Parameters:
event - Mouse event
delta - Mouse sensitivity in pixels
top_vp - The top viewport of the drawing
selected_vp - The viewport of the mouse event.
Returns:
Array of objects selected by the mouse event.

CreateResourceList

public GlgObject CreateResourceList(boolean list_named_res,
                                    boolean list_def_attr,
                                    boolean list_aliases)
ADVANCED: Queries object's resources. Creates an array of all resource names of this object on one level of hierarchy.

Parameters:
list_named_res - Include named resources if true
list_def_attr - Include default attributes if true
list_aliases - Include aliases if true
Returns:
an array of resources containing named resource objects, or dummy named objects for defauilt resources and aliases.

TransformObject

public boolean TransformObject(GlgObject xform,
                               int coord_type,
                               GlgObject parent)
ADVANCED: Transforms an object's points with a transformation object. The object's hierarchy must be set (drawn) to use this method.

Parameters:
xform - Transformation object
coord_type - Coordinate type (SCREEN_COORD, PARENT_COORD or OBJECT_COORD)
parent - Object's parent (returned by GetParent method)

CreatePointArray

public GlgObject CreatePointArray(int type)
ADVANCED: Creates an array containing all of an object's control points.

Parameters:
type - Reserved for future use.
Returns:
Array of the object's control points.

MoveObjectBy

public boolean MoveObjectBy(int coord_type,
                            double x,
                            double y,
                            double z)
Moves an object by specified distance in x, y and z directions.

Parameters:
coord_type - The coordinate system in which x, y and z distance is defined. May have the following values: SCREEN_COORD to move in pixels, PARENT_COORD to move in the world coordinates of the object's parent or OBJECT_COORD to move in the world coordinates of the object.
x - The X move distance.
y - The Y move distance.
z - The Z move distance.

MoveObjectBy

public boolean MoveObjectBy(int coord_type,
                            GlgPoint point)
Moves an object by specified distance in x, y and z directions.

Parameters:
coord_type - The coordinate system in which x, y and z distance is defined. May have the following values: SCREEN_COORD to move in pixels, PARENT_COORD to move in the world coordinates of the object's parent or OBJECT_COORD to move in the world coordinates of the object.
point - Point containing X, Y and Z distance values.

MoveObject

public boolean MoveObject(int coord_type,
                          GlgPoint start_point,
                          GlgPoint end_point)
Moves an object by specified vector.

Parameters:
coord_type - The coordinate system in which the move vector is defined. May have the following values: SCREEN_COORD to move in pixels, PARENT_COORD to move in the world coordinates of the object's parent or OBJECT_COORD to move in the world coordinates of the object.
start_point - Start point of the move vector.
end_point - End point of the move vector.

ScaleObject

public boolean ScaleObject(int coord_type,
                           GlgPoint center,
                           double x,
                           double y,
                           double z)
Scale object in X, Y and Z dimensions

Parameters:
coord_type - The coordinate system in which the center point is defined. May have the following values: SCREEN_COORD to use pixels, PARENT_COORD to use the world coordinates of the object's parent or OBJECT_COORD to use the world coordinates of the object.
center - Center of scaling. The center of the object's bounding box is used if null is passed.
x - The X scale factor.
y - The Y scale factor.
z - The Z scale factor.

RotateObject

public boolean RotateObject(int coord_type,
                            GlgPoint center,
                            double x,
                            double y,
                            double z)
Rotates an object around the X, Y or Z axis.

Parameters:
coord_type - The coordinate system in which the center point is defined. May have the following values: SCREEN_COORD to use pixels, PARENT_COORD to use the world coordinates of the object's parent or OBJECT_COORD to use the world coordinates of the object.
center - Center of rotation. The center of the object's bounding box is used if null is passed.
x - The X rotation angle.
y - The Y rotation angle.
z - The Z rotation angle.

PositionObject

public boolean PositionObject(int coord_type,
                              int anchoring,
                              GlgPoint position)
Moves an object to the specified position.

Parameters:
coord_type - The coordinate system in which position is defined. May have the following values: SCREEN_COORD to use pixels, PARENT_COORD to use the world coordinates of the object's parent or OBJECT_COORD to use the world coordinates of the object.
anchoring - Specifies which part of the object's bounding box will be position at the specified coordinates. It is a bitwise OR of horizontal and vertical anchor types: HLEFT, HCENTER and HRIGHT for horizontal types, and VTOP, VCENTER and VBOTTOM for vertical types.
position - New position

PositionObject

public boolean PositionObject(int coord_type,
                              int anchoring,
                              double x,
                              double y,
                              double z)
Move object to the specified position.

Parameters:
coord_type - The coordinate system in which position is defined. May have the following values: SCREEN_COORD to use pixels, PARENT_COORD to use the world coordinates of the object's parent or OBJECT_COORD to use the world coordinates of the object.
anchoring - Specifies which part of the object's bounding box will be position at the specified coordinates. It is a bitwise OR of horizontal and vertical anchor types: HLEFT, HCENTER and HRIGHT for horizontal types, and VTOP, VCENTER and VBOTTOM for vertical types.
x - The X coordinates of the new position.
y - The Y coordinates of the new position.
z - The Z coordinates of the new position.

FitObject

public boolean FitObject(int coord_type,
                         GlgCube box,
                         boolean keep_ratio)
Fits an object to the specified box.

Parameters:
coord_type - The coordinate system in which the box is defined. May have the following values: SCREEN_COORD to use pixels, PARENT_COORD to use the world coordinates of the object's parent or OBJECT_COORD to use the world coordinates of the object.
box - New object bounding box.
keep_ratio - If set to true, the same scale factor is used for X, Y and Z scaling.

LayoutObjects

public boolean LayoutObjects(GlgObject sel_elem,
                             int type,
                             double distance,
                             boolean use_box,
                             boolean process_subobjects)
Performs layout action on an object or a group of objects.

Parameters:
sel_elem - Anchor element, may be set to null if not used.
type - Type of the layout action. May have the following values: ALIGN_LEFT - align the left edge of elements within the group with the left edge of the achor element ALIGN_RIGHT - align the right edge of elements within the group with the right edge of the achor element ALIGN_HCENTER - align the center of elements within the group with the center of the achor element horizontally ALIGN_TOP - align the top edge of elements within the group with the top edge of the achor element ALIGN_BOTTOM - align the bottom edge of elements within the group with the bottom edge of the achor element ALIGN_VCENTER - align the center of elements within the group with the center of the achor element vertically SET_EQUAL_VSIZE - set the height of elements within the group to the height of the anchor SET_EQUAL_HSIZE - set the width of elements within the group to the width of the anchor SET_EQUAL_SIZE - set the width and height of elements within the group to the width and height of the anchor SET_EQUAL_VDISTANCE - equally distributes the group's elements in vertical direction as measured by the distance between their centers SET_EQUAL_HDISTANCE - equally distributes the group's elements in horizontal direction as measured by the distance between their centers SET_EQUAL_VSPACE - equally distibutes space gaps between group's elements in vertical direction SET_EQUAL_HSPACE - equally distibutes space gaps between group's elements in horizontal direction SET_VSIZE - If anchor is null, sets the object's height; if anchor in not null, sets the height of all elements within the group. The height is defined by the value of the distance parameter. SET_HSIZE - If anchor is null, sets the object's width; if anchor in not null, sets the width of all elements within the group. The width is defined by the value of the distance parameter. SET_VDISTANCE - set vertical distance between centers of the group's elements to a value defined by the distance parameter SET_HDISTANCE - set horizontal distance between centers of the group's elements to a value defined by the distance parameter SET_VSPACE - sets space gaps between group's elements in vertical direction to a value defined by the distance parameter SET_HSPACE - sets space gaps between group's elements in horizontal direction to a value defined by the distance parameter
distance - The distance in screen coordinates for positioning objects, depending on the layout action.
use_box - Use object's control points if false, otherwise use object's bounding box.
process_subobjects - If true, apply SET_VSIZE and SET_HSIZE actions to the subobjects of the group, otherwise apply the actions to the group itself.
Returns:
false if errors were encountered during layout action.

WorldToScreen

public boolean WorldToScreen(boolean inside_vp,
                             GlgPoint in_point,
                             GlgPoint out_point)
Converts a point from world to screen coordinates.

Parameters:
inside_vp - For viewports, may be set to true to use the coordinate system used to draw objects inside the viewport, or false to use viewport's parent coordinate system. The parameter is ignored for non-viewport objects.
in_point - Point in world coordinates.
out_point - Calculated screen coordinates.

ScreenToWorld

public boolean ScreenToWorld(boolean inside_vp,
                             GlgPoint in_point,
                             GlgPoint out_point)
Converts a point from screen to world coordinates.

Parameters:
inside_vp - For viewports, may be set to true to use the coordinate system used to draw objects inside the viewport, or false to use viewport's parent coordinate system. The parameter is ignored for non-viewport objects.
in_point - Point in screen coordinates.
out_point - Calculated world coordinates.

GetMatrixData

public GlgMatrixData GetMatrixData(GlgMatrixData matrix_data)
ADVANCED: Returns values of the matrix's coefficients

Parameters:
matrix_data - GlgMatrixData object to be filled with returned matrix data. If null is passed, a new GlgMatrixData object will be created.
Returns:
GlgMatrixData object filled with matrix data.

SetMatrixData

public void SetMatrixData(GlgMatrixData matrix_data)
ADVANCED: Sets matrix's coefficients to supplied values.

Parameters:
matrix_data - GlgMatrixData object containing new matrix values.

Glg Toolkit