Inheritance diagram for VideoLoadElement::
Public Methods | |
VideoLoadElement () | |
void | keyPressed () |
void | animationStep () |
boolean | continueAnimation () |
void | run () |
Protected Methods | |
void | doInit () |
|
00023 { 00024 int marginLF = 0; 00025 int marginUP = 0; 00026 int marginRG = Math.max(KeyComponent.componentSize().width / 2, 00027 ImageElement.componentSize().width / 2); 00028 int marginDW = 0; 00029 int machineW = 101; 00030 int machineH = 122; 00031 00032 setSize(marginLF+machineW+marginRG, marginUP+machineH+marginDW); 00033 setMachineImage(Images.vloader, marginLF, marginUP, machineW, machineH); 00034 00035 _output = createOutputSocket( 00036 marginLF+machineW-ImageElement.componentSize().width/2, 00037 marginUP + 66); 00038 _key = createKeyComponent( 00039 marginLF+machineW-KeyComponent.componentSize().width/2 - 2, 00040 marginUP + 8); 00041 00042 00043 _fac = null; 00044 _key.setVisible(false); 00045 } |
|
Reimplemented from AnimatedMachine.
00049 { 00050 if(_working) return; 00051 if(!_output.empty()) return; 00052 00053 VideoLoadProp dlg = new VideoLoadProp(); 00054 dlg.show(); 00055 if(dlg.name != null) { 00056 _name = dlg.name; 00057 00058 _working = true; 00059 _key.startAnimation(); 00060 new Thread(this).start(); 00061 } 00062 } |
|
Reimplemented from AnimatedMachine.
00065 {} |
|
Reimplemented from AnimatedMachine.
00069 { 00070 return _working; 00071 } |
|
00074 { 00075 try { 00076 HxCorba.ImageSeq vid = _fac.constructImageSeq(_name); 00077 if(vid != null) 00078 _output.setElement(new VideoElement(vid, new File(_name).getName())); 00079 00080 }catch(org.omg.CORBA.UNKNOWN e) { 00081 ErrorStreamArea.println("Video "+_name+" is sold out"); 00082 }catch(Exception e) { 00083 ErrorStreamArea.println(""+e); 00084 e.printStackTrace(); 00085 } 00086 _working = false; 00087 } |
|
Reimplemented from MachineElement.
00096 { 00097 _fac = ServiceRepository.instance().getConstructor(); 00098 if(_fac != null) 00099 _key.setVisible(true); 00100 else 00101 turnOff("No servers available"); 00102 00103 repaint(); 00104 } |