/** * Pass an initial set of capabilities. Called when the card's lookup is * being constructed. * @param capabilities An array of capabilities */ protected final void initCapabilities (ICardCapability... capabilities) { content.set(Arrays.asList(capabilities), null); }
private void updateLookup() { Set<Object> stuff = new HashSet<Object>(); JavacardPlatform pform = platforms.getSelectedItem() instanceof JavacardPlatform ? (JavacardPlatform) platforms.getSelectedItem() : null; if (pform != null) { stuff.add(pform); } if (devices.getSelectedItem() instanceof Card) { stuff.add (devices.getSelectedItem()); } content.set(stuff, null); }
private static void updateLookup(DataObject d, InstanceContent ic) { ic.set(Arrays.asList(new Object[] { d, d.getPrimaryFile() }), null); }
public synchronized void propertyChange(PropertyChangeEvent event) { if (propertyChanging) { // Avoid an infinite loop whereby changing the lookup contents // causes the activated nodes to change, which calls us again. return; } propertyChanging = true; try { Node[] nodes = (Node[]) event.getNewValue(); List<Node> list = new ArrayList<Node>(); for (Node node : nodes) { // Can't have same object in two lookups, apparently. if (delegate == null || !node.equals(delegate)) { list.add(node); } } nodesHack.set(list, null); updateExplorerManager(list.toArray(new Node[list.size()])); } finally { propertyChanging = false; } }
@Override @SuppressWarnings("deprecation") protected void beforeLookup(Template<?> template) { if (Action.class.isAssignableFrom(template.getType())) { ic.set(Arrays.asList( fsCompat(compat().fs).getActions(compat().set)), null); } } }
public void setController(AnimationEditor controller){ if(myController != null){ myController.removePropertyChangeListener(this); } myController = controller; myPanel.setController(myController); AnimationNode an = new AnimationNode(myController); content.set(Collections.singleton (an), null); String name = myController == null ? "Untitled Animation" : myController.getName(); setAnimName(name); if(myController != null){ myController.addPropertyChangeListener(this); } an.registerCookies(content, getLookup()); //content.add(an.getCookie(SaveCookie.class)); //setActivatedNodes(new Node[]{an}); }