Inheritance diagram for ViewElement::
Public Methods | |
ViewElement () | |
void | keyPressed () |
void | animationStep () |
boolean | continueAnimation () |
void | run () |
|
00022 { 00023 int marginLF = 0; 00024 int marginUP = 0; 00025 int marginRG = KeyComponent.componentSize().width / 2; 00026 int marginDW = ImageElement.componentSize().height / 2; 00027 int machineW = 74; 00028 int machineH = 139; 00029 00030 setSize(marginLF+machineW+marginRG, marginUP+machineH+marginDW); 00031 setMachineImage(Images.view, marginLF, marginUP, machineW, machineH); 00032 00033 _props = new ViewProperties(); 00034 _props.mode = "Direct"; 00035 00036 _input = createInputSocket(marginLF+19, marginUP + machineH - marginDW - 2); 00037 createPropertyComponent(_props, marginLF+8, marginUP + 100, 60); 00038 _key = createKeyComponent(marginLF+machineW-marginRG-2, marginUP + 73); 00039 00040 } |
|
Reimplemented from AnimatedMachine.
00044 { 00045 if(_working) return; 00046 00047 if(_input.empty()) return; 00048 00049 _working = true; 00050 _key.startAnimation(); 00051 new Thread(this).start(); 00052 } |
|
Reimplemented from AnimatedMachine.
00055 {} |
|
Reimplemented from AnimatedMachine.
00059 { 00060 return _working; 00061 } |
|
00064 { 00065 try { 00066 HxCorba.ImageRep img = _input.getImageRep(); 00067 if(img != null) {; 00068 Image javaImg = Images.imageFromStub(img, _props.mode); 00069 int w = img.dimensionSize(1); 00070 int h = img.dimensionSize(2); 00071 00072 javax.swing.JFrame frame = new javax.swing.JFrame("Image"); 00073 frame.getContentPane().add(new ImageCanvas(javaImg)); 00074 frame.setSize(w,h+25); 00075 frame.setVisible(true); 00076 } 00077 }catch(org.omg.CORBA.SystemException e){ 00078 ErrorStreamArea.println("Error: "+e); 00079 } 00080 _working = false; 00081 } |