/** * 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); }
show(show!=null ? show : DEFAULT_COMPONENT);
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()); } } });
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()); } } });
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).getId()); } } } });
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).getId()); } } } });
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()); } } } });
ocl.show(sel!=null ? sel : ObjectCardLayout.DEFAULT_COMPONENT);
ocl.show(sel!=null ? sel : ObjectCardLayout.DEFAULT_COMPONENT);
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); } } } } });