public void itemStateChanged(ItemEvent e) { Object o = cbmechs.getSelectedItem(); final MechanismInfo mi = o instanceof MechanismInfo? (MechanismInfo)o: null; AcquireCertificatePanel.this.secser.setAcquisitionMechanism(mi!=null? mi.getClazz(): null); if(mi==null) { if(ocl.getComponent("none")==null) { JPanel p = new JPanel(new BorderLayout()); p.add(new JLabel("Deactivated", JLabel.CENTER), BorderLayout.CENTER); pdetail.add(p, "none"); } ocl.show("none"); } else { createMechanismPanel(mi); ocl.show(mi.getClazz()); } } });
/** * Get the currently shown panel. */ public IAbstractViewerPanel getCurrentPanel() { IAbstractViewerPanel ret = null; Object key = ocl.getCurrentKey(); if(key!=null) { ret = (IAbstractViewerPanel)panels.get(key); } return ret; }
public void run() { if(BDIAgentFactory.FILETYPE_BDIAGENT.equals(ad.getType())) { if(cards.isAvailable(ad)) { detail.remove(cards.getComponent(ad)); } } } });
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { a = STOP_DEBUGGER; } else { a = START_DEBUGGER; } } return a; } });
if(sel==null || ocl.isAvailable(sel)) ocl.show(sel!=null ? sel : ObjectCardLayout.DEFAULT_COMPONENT);
this.updateactions = new HashMap<String, ICommand<Object>>(); this.ocl = new ObjectCardLayout(); this.pdetail = new JPanel(ocl);
/** * Will be called from the container, when * a new component with constraint object * was added. * @param component The component. * @param constraints The constraints. */ public void addLayoutComponent(Component component, final Object constraints) { assert SwingUtilities.isEventDispatchThread(); // System.out.println("added: "+constraints+" "+component); if(constraints == null) throw new RuntimeException("no_object_for_card_specified"); components.put(constraints, component); component.setVisible(false); show(constraints); }
/** * A component was added to the container. * @param name The constraint in a string. * @param comp The component. */ public void addLayoutComponent(String name, Component comp) { assert SwingUtilities.isEventDispatchThread(); addLayoutComponent(comp, name); }
public void nodeRemoved(ITreeNode node) { if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { DebuggerMainPanel panel = (DebuggerMainPanel)cards.getComponent(node.getId()); panel.dispose(); detail.remove(panel); } } }
if(sel==null || ocl.isAvailable(sel)) ocl.show(sel!=null ? sel : ObjectCardLayout.DEFAULT_COMPONENT);
this.updateactions = new HashMap<String, ICommand<Object>>(); this.ocl = new ObjectCardLayout(); this.pdetail = new JPanel(ocl);
show(show!=null ? show : DEFAULT_COMPONENT);
public Action getDefaultAction(ISwingTreeNode node) { Action a = null; if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { a = STOP_DEBUGGER; } else { a = START_DEBUGGER; } } return a; } });
public void itemStateChanged(ItemEvent e) { Object o = cbmechs.getSelectedItem(); final MechanismInfo mi = o instanceof MechanismInfo? (MechanismInfo)o: null; AcquireCertificatePanel.this.secser.setAcquisitionMechanism(mi!=null? mi.getClazz(): null); if(mi==null) { if(ocl.getComponent("none")==null) { JPanel p = new JPanel(new BorderLayout()); p.add(new JLabel("Deactivated", JLabel.CENTER), BorderLayout.CENTER); pdetail.add(p, "none"); } ocl.show("none"); } else { createMechanismPanel(mi); ocl.show(mi.getClazz()); } } });
ocl = new ObjectCardLayout(); centerp = new JPanel(ocl);
public void valueChanged(TreeSelectionEvent e) { JTree tree = comptree.getTree(); if(tree.getSelectionPath()!=null) { Object node = tree.getSelectionPath().getLastPathComponent(); if(node instanceof IActiveComponentTreeNode) { cards.show(((IActiveComponentTreeNode)node).getDescription()); } } } });
/** * Get the currently shown panel. */ public IAbstractViewerPanel getCurrentPanel() { IAbstractViewerPanel ret = null; Object key = ocl.getCurrentKey(); if(key!=null) { ret = (IAbstractViewerPanel)panels.get(key); } return ret; }
public void nodeRemoved(ITreeNode node) { if(node instanceof IActiveComponentTreeNode) { if(cards.getComponent(node.getId())!=null) { DebuggerMainPanel panel = (DebuggerMainPanel)cards.getComponent(node.getId()); panel.dispose(); detail.remove(panel); } } }
public void valueChanged(TreeSelectionEvent e) { JTree tree = comptree.getTree(); if(tree.getSelectionPath()!=null) { ISwingTreeNode node = (ISwingTreeNode)tree.getSelectionPath().getLastPathComponent(); Object nodeid = node.getId(); if(nodeid!=null) { if(cards.getComponent(nodeid)!=null) { storeCurrentPanelSettings(); IAbstractViewerPanel panel = panels.get(nodeid); panel.setProperties(props!=null ? props.getSubproperty(panel.getId()) : null); cards.show(nodeid); } } } } });
ocl = new ObjectCardLayout(); centerp = new JPanel(ocl);