@Override public void valueChanged(ListSelectionEvent evt) { if(jl_font.getSelectedValue()==null || jl_fontSize.getSelectedValue()==null){ return; } String fontName = (String)jl_font.getSelectedValue(); int fontSize = Integer.parseInt((String)jl_fontSize.getSelectedValue()); Font f = new Font(fontName, Font.PLAIN, fontSize); jl_preview.setFont(f); }
public void valueChanged (ListSelectionEvent evt) { if (evt.getValueIsAdjusting()) return; prefs.put("system.font", (String)fontList.getSelectedValue()); updateFont(); } });
public void valueChanged (ListSelectionEvent evt) { if (evt.getValueIsAdjusting()) return; prefs.put("system.font", (String)fontList.getSelectedValue()); updateFont(); } });
public void actionPerformed (ActionEvent evt) { new EffectPanel((ConfigurableEffect)effectsList.getSelectedValue()); } });
public void valueChanged (ListSelectionEvent evt) { ConfigurableEffect selectedEffect = (ConfigurableEffect)effectsList.getSelectedValue(); boolean enabled = selectedEffect != null; for (Iterator iter = effectPanels.iterator(); iter.hasNext();) { ConfigurableEffect effect = ((EffectPanel)iter.next()).getEffect(); if (effect == selectedEffect) { enabled = false; break; } } addEffectButton.setEnabled(enabled); } });
public void actionPerformed (ActionEvent evt) { new EffectPanel((ConfigurableEffect)effectsList.getSelectedValue()); } });
public void valueChanged (ListSelectionEvent evt) { ConfigurableEffect selectedEffect = (ConfigurableEffect)effectsList.getSelectedValue(); boolean enabled = selectedEffect != null; for (Iterator iter = effectPanels.iterator(); iter.hasNext();) { ConfigurableEffect effect = ((EffectPanel)iter.next()).getEffect(); if (effect == selectedEffect) { enabled = false; break; } } addEffectButton.setEnabled(enabled); } });
@Override public void valueChanged(ListSelectionEvent e) { if (list.getSelectedValue() != null) { model.selectNode((Node) list.getSelectedValue(), EvaluationResultsPanel.this); } } });
public void actionPerformed(ActionEvent e) { Object selected = nearbyVertices.getSelectedValue(); if (selected != null) { sourceVertex.setText(selected.toString()); } } });
public void actionPerformed(ActionEvent e) { Object selected = nearbyVertices.getSelectedValue(); if (selected != null) { sinkVertex.setText(selected.toString()); } } });
/** * Get the family name of the selected font. * * @return the font family of the selected font. * * @see #setSelectedFontFamily **/ public String getSelectedFontFamily() { String fontName = (String) getFontFamilyList().getSelectedValue(); return fontName; }
@Override public boolean saveOptions() { String fontName= (String)jl_font.getSelectedValue(); String fontSizeStr = (String)jl_fontSize.getSelectedValue(); int fontSize = Integer.parseInt(fontSizeStr); Font f = new Font(fontName, Font.PLAIN, fontSize); ServiceLocator.getInstance(RESTViewImpl.class).setTextAreaFont(f); return true; }
/** * Get the selected tree and its corresponding matched parts * @return a tree that matches the tregex expression */ public Pair<TreeFromFile, List<Tree>> getSelectedMatch() { if(!isEmpty()) { TreeFromFile selectedTree = (TreeFromFile) list.getSelectedValue(); return new Pair<>(selectedTree, matchedParts.get(selectedTree)); } else return null; }
@Override public void actionPerformed(ActionEvent e) { State s1 = firstComparePathStates.getSelectedValue(); State s2 = secondComparePathStates.getSelectedValue(); DominanceFunction pareto = new DominanceFunction.Pareto(); System.out.println("s1 dominates s2:" + pareto.betterOrEqualAndComparable(s1, s2)); System.out.println("s2 dominates s1:" + pareto.betterOrEqualAndComparable(s2, s1)); } });
@Override public void shutdownOptions() { ServiceLocator.getInstance(IGlobalOptions.class).setProperty(PROP_PREFIX + "font", (String)jl_font.getSelectedValue()); ServiceLocator.getInstance(IGlobalOptions.class).setProperty(PROP_PREFIX + "fontSize", (String)jl_fontSize.getSelectedValue()); }
public void valueChanged(ListSelectionEvent e) { @SuppressWarnings("unchecked") JList<GraphBuilderAnnotation> theList = (JList<GraphBuilderAnnotation>) e.getSource(); GraphBuilderAnnotation anno = theList.getSelectedValue(); if (anno == null) return; showGraph.drawAnotation(anno); } });
@Override public void mouseDragged(MouseEvent e) { if (MatchesPanel.getInstance().isEmpty()) return; if (firstMouseEvent != null) { e.consume(); JTextField label = ((TreeFromFile) list.getSelectedValue()).getLabel(); if(dragNDrop) { if(label == null) return; if(Point2D.distanceSq(e.getX(), e.getY(), firstMouseEvent.getX(), firstMouseEvent.getY()) > 25) { //do DnD list.getTransferHandler().exportAsDrag((JComponent) e.getSource(), firstMouseEvent, TransferHandler.COPY); } } else { addHighlight(label, firstMouseEvent, e); } } }
void save (File file) throws IOException { HieroSettings settings = new HieroSettings(); settings.setFontName((String)fontList.getSelectedValue()); settings.setFontSize(((Integer)fontSizeSpinner.getValue()).intValue()); settings.setFont2File(fontFileText.getText());
void save (File file) throws IOException { HieroSettings settings = new HieroSettings(); settings.setFontName((String)fontList.getSelectedValue()); settings.setFontSize(((Integer)fontSizeSpinner.getValue()).intValue()); settings.setFont2File(fontFileText.getText());
@Override public void valueChanged(ListSelectionEvent arg0) { TreeFromFile t = (TreeFromFile) list.getSelectedValue(); if(t == null) { lastSelected = null; return; } JTextField curSelected = t.getLabel(); if(lastSelected != null) { if(lastSelected != curSelected) { //get rid of old highlights lastSelected.getHighlighter().removeAllHighlights(); lastSelected = curSelected; firstMouseEvent = null; lastSelected.repaint(); } } else lastSelected = curSelected; }