Example #1
0
 /**
  * ************************************************************************* Set an empty model
  * ***********************************************************************
  */
 protected void emptyModel() {
   if (m_root == null) {
     m_root = new StackItem();
   }
   Logger.debug("Empty model", Level.GUI, this);
   m_root.addChild(new StackItem("(none)", ""));
   m_empty = true;
 }
Example #2
0
 @Override
 public void procedureModelUnloaded(String instanceId, boolean doneLocally) {
   Logger.debug("Received notification: procedure " + instanceId + " closed", Level.GUI, this);
   StackItem item = findRootItem(instanceId);
   if (item != null) {
     m_root.removeChild(item);
     m_view.refresh();
   }
 }
Example #3
0
 @Override
 public void procedureModelLoaded(String instanceId) {
   Logger.debug("Received notification: procedure " + instanceId + " open", Level.GUI, this);
   Procedure proc = s_mgr.getProcedure(instanceId);
   if (m_empty) {
     m_root.removeChild(m_root.getChildren()[0]);
     m_empty = false;
   }
   StackItem item = new StackItem(instanceId, proc.getRootCode());
   m_root.addChild(item);
   m_view.refresh();
 }
Example #4
0
 /**
  * ************************************************************************* Constructor
  *
  * @param xmlElement The XML config file element for a color definition
  *     <p>************************************************************************
  */
 public ColorInfo(Element xmlElement) {
   if (xmlElement.getNodeType() == Node.ELEMENT_NODE) {
     m_id = xmlElement.getAttribute("id");
     String colorDef = xmlElement.getTextContent();
     if (colorDef == null) {
       Logger.error("Bad color definition: " + m_id, Level.CONFIG, this);
       m_rgb = null;
       return;
     }
     String[] defs = colorDef.split(":");
     if (defs.length != 3) {
       Logger.error("Bad color definition: " + m_id, Level.CONFIG, this);
       m_rgb = null;
       return;
     }
     int colorR = Integer.parseInt(defs[0]);
     int colorG = Integer.parseInt(defs[1]);
     int colorB = Integer.parseInt(defs[2]);
     m_rgb = new Color(Display.getCurrent(), colorR, colorG, colorB);
   }
 }
 @Override
 public void contextError(ErrorData error) {
   Logger.debug("Fired [context error]", Level.COMM, this);
   ServerBridge.get().fireContextError(error);
 }
 @Override
 public void contextDetached() {
   Logger.debug("Fired [context detached]", Level.COMM, this);
   ServerBridge.get().fireContextDetached();
 }
 @Override
 public void contextAttached(ContextInfo ctx) {
   Logger.debug("Fired [context attached]", Level.COMM, this);
   ServerBridge.get().fireContextAttached(ctx);
 }
 public GuiContextOperations() {
   Logger.debug("Created", Level.INIT, this);
 }