1 // Java Native Class from Cas.Cade
2 // Copyright (C) 1991,1999 by
4 // MATRA DATAVISION, FRANCE
6 // This software is furnished in accordance with the terms and conditions
7 // of the contract and with the inclusion of the above copyright notice.
8 // This software or any other copy thereof may not be provided or otherwise
9 // be made available to any other person. No title to an ownership of the
10 // software is hereby transferred.
12 // At the termination of the contract, the software and all copies of this
13 // software must be deleted.
17 package CASCADESamplesJni;
20 import CASCADESamplesJni.Aspect_Background;
21 import CASCADESamplesJni.Quantity_NameOfColor;
22 import jcas.Standard_Short;
23 import jcas.Standard_Boolean;
24 import jcas.Standard_CString;
25 import CASCADESamplesJni.Aspect_FillMethod;
26 import CASCADESamplesJni.Aspect_TypeOfResize;
27 import jcas.Standard_Integer;
28 import jcas.Standard_Real;
29 import CASCADESamplesJni.Aspect_GraphicDevice;
32 public class Aspect_Window extends CASCADESamplesJni.MMgt_TShared {
35 System.loadLibrary("CASCADESamplesJni");
38 public void SetBackground(Aspect_Background ABack) {
39 Aspect_Window_SetBackground_1(ABack);
42 private native void Aspect_Window_SetBackground_1(Aspect_Background ABack);
44 public void SetBackground(short BackColor) {
45 Aspect_Window_SetBackground_2(BackColor);
48 private native void Aspect_Window_SetBackground_2(short BackColor);
50 public boolean SetBackground(Standard_CString aName,short aMethod) {
51 return Aspect_Window_SetBackground_3(aName,aMethod);
54 private native boolean Aspect_Window_SetBackground_3(Standard_CString aName,short aMethod);
56 native public void SetDoubleBuffer(boolean DBmode);
57 native public void Flush();
58 native public void Map();
59 native public void Unmap();
60 native public short DoResize();
61 native public boolean DoMapping();
62 native public void Destroy();
63 native public void Clear();
64 native public void ClearArea(int XCenter,int YCenter,int Width,int Height);
65 native public void Restore();
66 native public void RestoreArea(int XCenter,int YCenter,int Width,int Height);
67 native public boolean Dump(Standard_CString aFilename,double aGammaValue);
68 native public boolean DumpArea(Standard_CString aFilename,int Xc,int Yc,int Width,int Height,double aGammaValue);
69 native public boolean Load(Standard_CString aFilename);
70 native public boolean LoadArea(Standard_CString aFilename,int Xc,int Yc,int Width,int Height);
71 native public final Aspect_Background Background();
72 native public final Standard_CString BackgroundImage();
73 native public final short BackgroundFillMethod();
74 native public final Aspect_GraphicDevice GraphicDevice();
75 native public boolean IsMapped();
76 native public double Ratio();
77 public void Position(Standard_Real X1,Standard_Real Y1,Standard_Real X2,Standard_Real Y2) {
78 Aspect_Window_Position_1(X1,Y1,X2,Y2);
81 private native void Aspect_Window_Position_1(Standard_Real X1,Standard_Real Y1,Standard_Real X2,Standard_Real Y2);
83 public void Position(Standard_Integer X1,Standard_Integer Y1,Standard_Integer X2,Standard_Integer Y2) {
84 Aspect_Window_Position_2(X1,Y1,X2,Y2);
87 private native void Aspect_Window_Position_2(Standard_Integer X1,Standard_Integer Y1,Standard_Integer X2,Standard_Integer Y2);
89 public void Size(Standard_Real Width,Standard_Real Height) {
90 Aspect_Window_Size_1(Width,Height);
93 private native void Aspect_Window_Size_1(Standard_Real Width,Standard_Real Height);
95 public void Size(Standard_Integer Width,Standard_Integer Height) {
96 Aspect_Window_Size_2(Width,Height);
99 private native void Aspect_Window_Size_2(Standard_Integer Width,Standard_Integer Height);
101 native public void MMSize(Standard_Real Width,Standard_Real Height);
102 public double Convert(int PV) {
103 return Aspect_Window_Convert_1(PV);
106 private native double Aspect_Window_Convert_1(int PV);
108 public int Convert(double DV) {
109 return Aspect_Window_Convert_2(DV);
112 private native int Aspect_Window_Convert_2(double DV);
114 public void Convert(int PX,int PY,Standard_Real DX,Standard_Real DY) {
115 Aspect_Window_Convert_3(PX,PY,DX,DY);
118 private native void Aspect_Window_Convert_3(int PX,int PY,Standard_Real DX,Standard_Real DY);
120 public void Convert(double DX,double DY,Standard_Integer PX,Standard_Integer PY) {
121 Aspect_Window_Convert_4(DX,DY,PX,PY);
124 private native void Aspect_Window_Convert_4(double DX,double DY,Standard_Integer PX,Standard_Integer PY);
126 native public boolean BackingStore();
127 native public boolean DoubleBuffer();
128 public Aspect_Window() {