bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public void cancelCellEditing() { if (editingComponent != null) { tree.cancelEditing(); editingComponent = null; } stopEditingTimer(); }
public void cancelCellEditing() { if (editingComponent != null) { tree.cancelEditing(); editingComponent = null; } stopEditingTimer(); }
315
protected TreeCellEditor createTreeCellEditor() { DefaultCellEditor editor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( UIManager.getBorder("Tree.selectionBorder"))); editor.addCellEditorListener(new RealEditorListener()); editor.setClickCountToStart(CLICK_COUNT_TO_START); realEditor = editor; return editor; }
protected TreeCellEditor createTreeCellEditor() { DefaultCellEditor editor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( UIManager.getBorder("Tree.selectionBorder"))); editor.addCellEditorListener(new RealEditorListener()); editor.setClickCountToStart(CLICK_COUNT_TO_START); realEditor = editor; return editor; }
316
protected void determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { renderer.getTreeCellRendererComponent(tree, value, isSelected, expanded, leaf, row, true); Icon c = renderer.getIcon(); if (c != null) offset = renderer.getIconTextGap() + c.getIconWidth(); else offset = 0; }
protected void determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { renderer.getTreeCellRendererComponent(tree, value, isSelected, expanded, leaf, row, true); Icon c = renderer.getIcon(); if (c != null) offset = renderer.getIconTextGap() + c.getIconWidth(); else offset = 0; }
317
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) realEditor = createTreeCellEditor(); return realEditor.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row); }
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) realEditor = createTreeCellEditor(); return realEditor.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row); }
319
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) realEditor = createTreeCellEditor(); return realEditor.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row); }
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) realEditor = createTreeCellEditor(); return realEditor.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row); }
320
public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; }
public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; }
321
public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; }
public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; }
322
public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; }
public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } } } } if (! realEditor.isCellEditable(event)) ret = false; else { if (canEditImmediately(event)) ret = true; else if (ed && shouldStartEditingTimer(event)) startEditingTimer(); else if (timer != null && timer.isRunning()) timer.stop(); } if (ret) prepareForEditing(); return ret; }
323
protected void prepareForEditing() { editingContainer.removeAll(); editingContainer.add(editingComponent); }
protected void prepareForEditing() { if (editingComponent != null) editingContainer.add(editingComponent); }
324
protected boolean shouldStartEditingTimer(EventObject event) { if ((event instanceof MouseEvent) && ((MouseEvent) event).getClickCount() == 1) return true; return false; }
protected boolean shouldStartEditingTimer(EventObject event) { if ((event instanceof MouseEvent) && ((MouseEvent) event).getClickCount() == 1) return true; return false; }
326
protected void startEditingTimer() { if (timer != null) timer.start(); }
protected void startEditingTimer() { if (timer == null) { timer = new Timer(1200, this); timer.setRepeats(false); } timer.start(); }
327
public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; }
public boolean stopCellEditing() { boolean ret = false; if (realEditor.stopCellEditing()) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; }
328
public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; }
public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; }
329
public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; }
public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return ret; }
330
public void valueChanged(TreeSelectionEvent e) { tPath = lastPath; lastPath = e.getNewLeadSelectionPath(); lastRow = tree.getRowForPath(lastPath); stopCellEditing(); }
public void valueChanged(TreeSelectionEvent e) { tPath = lastPath; lastPath = e.getNewLeadSelectionPath(); lastRow = tree.getRowForPath(lastPath); stopCellEditing(); }
331
public boolean equals(Object object) { Object[] treepath; int index; if (object instanceof TreePath) { treepath = ((TreePath) object).getPath(); if (treepath.length != path.length) return false; for (index = 0; index < path.length; index++) { if (!treepath[index].equals(path[index])) return false; } // Tree Path's are equals return true; } // Unequal return false; }
public boolean equals(Object object) { Object[] treepath; int index; if (object instanceof TreePath) { treepath = ((TreePath) object).getPath(); if (treepath.length != path.length) return false; for (index = 0; index < path.length; index++) { if (!path[index].equals(treepath[index])) return false; } // Tree Path's are equals return true; } // Unequal return false; }
332
public SizeRequirements() { // TODO } // SizeRequirements()
public SizeRequirements() { // TODO } // SizeRequirements()
333
public static void calculateAlignedPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { // TODO } // calculateAlignedPositions()
public static void calculateAlignedPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { // TODO } // calculateAlignedPositions()
334
public static void calculateTiledPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { // TODO } // calculateTiledPositions()
public static void calculateTiledPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { // TODO } // calculateTiledPositions()
335
public static SizeRequirements getAlignedSizeRequirements( SizeRequirements[] children) { return null; // TODO } // getAlignedSizeRequirements()
public static SizeRequirements getAlignedSizeRequirements( SizeRequirements[] children) { return null; // TODO } // getAlignedSizeRequirements()
336
public static SizeRequirements getTiledSizeRequirements( SizeRequirements[] children) { return null; // TODO } // getTiledSizeRequirements()
public static SizeRequirements getTiledSizeRequirements( SizeRequirements[] children) { return null; // TODO } // getTiledSizeRequirements()
337
public boolean isFocusCycleRoot () { return focusCycleRoot; }
public boolean isFocusCycleRoot (Container c) { return focusCycleRoot; }
338
public boolean isFocusCycleRoot () { return focusCycleRoot; }
public boolean isFocusCycleRoot () { if (this == c && isFocusCycleRoot ()) return true; Container ancestor = getFocusCycleRootAncestor (); if (c == ancestor) return true; return false; }
339
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
341
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
342
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
343
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
344
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
345
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
346
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
347
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
348
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
349
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseListener = createMouseListener(); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
350
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
351
public void uninstallUI(JComponent c) { tree.setFont(null); tree.setForeground(null); tree.setBackground(null); uninstallKeyboardActions(); tree.removePropertyChangeListener(propertyChangeListener); tree.removeFocusListener(focusListener); tree.removeTreeSelectionListener(treeSelectionListener); tree.removeMouseListener(mouseInputListener); tree.removeKeyListener(keyListener); tree.removePropertyChangeListener(selectionModelPropertyChangeListener); tree.removeComponentListener(componentListener); tree.removeTreeExpansionListener(treeExpansionListener); TreeCellEditor tce = tree.getCellEditor(); if (tce != null) tce.removeCellEditorListener(cellEditorListener); TreeModel tm = tree.getModel(); if (tm != null) tm.removeTreeModelListener(treeModelListener); tree = null; uninstallComponents(); completeUIUninstall(); }
public void uninstallUI(JComponent c) { tree.setFont(null); tree.setForeground(null); tree.setBackground(null); uninstallKeyboardActions(); tree.removePropertyChangeListener(propertyChangeListener); tree.removeFocusListener(focusListener); tree.removeTreeSelectionListener(treeSelectionListener); tree.removeMouseListener(mouseListener); tree.removeKeyListener(keyListener); tree.removePropertyChangeListener(selectionModelPropertyChangeListener); tree.removeComponentListener(componentListener); tree.removeTreeExpansionListener(treeExpansionListener); TreeCellEditor tce = tree.getCellEditor(); if (tce != null) tce.removeCellEditorListener(cellEditorListener); TreeModel tm = tree.getModel(); if (tm != null) tm.removeTreeModelListener(treeModelListener); tree = null; uninstallComponents(); completeUIUninstall(); }
353
public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = false; TreeModel mod = tree.getModel(); setModel(mod); tree.setRootVisible(true); if (mod != null) tree.expandPath(new TreePath(mod.getRoot())); treeSelectionModel = tree.getSelectionModel(); installKeyboardActions(); installListeners(); completeUIInstall(); }
public void installUI(JComponent c) { super.installUI(c); tree = (JTree) c; currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = false; TreeModel mod = tree.getModel(); setModel(mod); tree.setRootVisible(true); if (mod != null) tree.expandPath(new TreePath(mod.getRoot())); treeSelectionModel = tree.getSelectionModel(); installKeyboardActions(); installListeners(); completeUIInstall(); }
354
public void uninstallUI(JComponent c) { uninstallDefaults((JTree) c); uninstallKeyboardActions(); uninstallListeners(); tree = null; completeUIUninstall(); }
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallKeyboardActions(); uninstallListeners(); tree = null; completeUIUninstall(); }
356
protected void reindex() { Element[] lines; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); int j = 0; for (int i = str.indexOf('\n', 0); i != -1; i = str.indexOf('\n', i + 1)) { elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; } if (j < content.length()) elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, content.length())); lines = new Element[elts.size()]; for (int i = 0; i < elts.size(); ++i) lines[i] = (Element) elts.get(i); } catch (BadLocationException e) { lines = new Element[1]; lines[0] = createLeafElement(rootElement, SimpleAttributeSet.EMPTY, 0, 1); } ((BranchElement) rootElement).replace(0, rootElement.getElementCount(), lines); }
private void reindex() { Element[] lines; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); int j = 0; for (int i = str.indexOf('\n', 0); i != -1; i = str.indexOf('\n', i + 1)) { elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; } if (j < content.length()) elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, content.length())); lines = new Element[elts.size()]; for (int i = 0; i < elts.size(); ++i) lines[i] = (Element) elts.get(i); } catch (BadLocationException e) { lines = new Element[1]; lines[0] = createLeafElement(rootElement, SimpleAttributeSet.EMPTY, 0, 1); } ((BranchElement) rootElement).replace(0, rootElement.getElementCount(), lines); }
357
public void keyPressed(KeyEvent e) throws NotImplementedException { // FIXME: This method calls JComboBox.selectWithKeyChar if the key that // was pressed is not a navigation key. }
public void keyPressed(KeyEvent e) { // FIXME: This method calls JComboBox.selectWithKeyChar if the key that // was pressed is not a navigation key. }
358
public Accessible getAccessibleChild(JComponent c, int i) throws NotImplementedException { // FIXME: Need to implement return null; }
public Accessible getAccessibleChild(JComponent c, int i) { // FIXME: Need to implement return null; }
362
public Accessible getAccessibleChild(JComponent c, int i) throws NotImplementedException { // FIXME: Need to implement return null; }
public Accessible getAccessibleChild(JComponent c, int i) throws NotImplementedException { // FIXME: Need to implement Accessible child = null; switch (i) { case 0: if (popup instanceof Accessible) { AccessibleContext ctx = ((Accessible) popup).getAccessibleContext(); ctx.setAccessibleParent(comboBox); child = (Accessible) popup; } break; case 1: if (comboBox.isEditable() && editor instanceof Accessible) { AccessibleContext ctx = ((Accessible) editor).getAccessibleContext(); ctx.setAccessibleParent(comboBox); child = (Accessible) editor; } break; } return child; }
363
public int getAccessibleChildrenCount(JComponent c) throws NotImplementedException { // FIXME: Need to implement return 0; }
public int getAccessibleChildrenCount(JComponent c) { // FIXME: Need to implement return 0; }
364
public int getAccessibleChildrenCount(JComponent c) throws NotImplementedException { // FIXME: Need to implement return 0; }
public int getAccessibleChildrenCount(JComponent c) throws NotImplementedException { // FIXME: Need to implement int count = 1; if (comboBox.isEditable()) count = 2; return count; }
365
protected void installListeners() { // install combo box's listeners propertyChangeListener = createPropertyChangeListener(); comboBox.addPropertyChangeListener(propertyChangeListener); focusListener = createFocusListener(); editor.addFocusListener(focusListener); itemListener = createItemListener(); comboBox.addItemListener(itemListener); keyListener = createKeyListener(); comboBox.addKeyListener(keyListener); // install listeners that listen to combo box model listDataListener = createListDataListener(); comboBox.getModel().addListDataListener(listDataListener); // Install mouse and key listeners from the popup. popupMouseListener = popup.getMouseListener(); comboBox.addMouseListener(popupMouseListener); popupMouseMotionListener = popup.getMouseMotionListener(); comboBox.addMouseMotionListener(popupMouseMotionListener); popupKeyListener = popup.getKeyListener(); comboBox.addKeyListener(popupKeyListener); }
protected void installListeners() { // install combo box's listeners propertyChangeListener = createPropertyChangeListener(); comboBox.addPropertyChangeListener(propertyChangeListener); focusListener = createFocusListener(); comboBox.addFocusListener(focusListener); itemListener = createItemListener(); comboBox.addItemListener(itemListener); keyListener = createKeyListener(); comboBox.addKeyListener(keyListener); // install listeners that listen to combo box model listDataListener = createListDataListener(); comboBox.getModel().addListDataListener(listDataListener); // Install mouse and key listeners from the popup. popupMouseListener = popup.getMouseListener(); comboBox.addMouseListener(popupMouseListener); popupMouseMotionListener = popup.getMouseMotionListener(); comboBox.addMouseMotionListener(popupMouseMotionListener); popupKeyListener = popup.getKeyListener(); comboBox.addKeyListener(popupKeyListener); }
366
protected boolean isNavigationKey(int keyCode) throws NotImplementedException { // FIXME: Need to implement return false; }
protected boolean isNavigationKey(int keyCode) { // FIXME: Need to implement return false; }
368
protected boolean isNavigationKey(int keyCode) throws NotImplementedException { // FIXME: Need to implement return false; }
protected boolean isNavigationKey(int keyCode) throws NotImplementedException { // FIXME: Need to implement return keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_DOWN || keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_RIGHT || keyCode == KeyEvent.VK_ENTER || keyCode == KeyEvent.VK_ESCAPE || keyCode == KeyEvent.VK_TAB; }
369
protected void selectPreviousPossibleValue() { int index = comboBox.getSelectedIndex(); if (index != 0) comboBox.setSelectedIndex(index - 1); }
protected void selectPreviousPossibleValue() { int index = comboBox.getSelectedIndex(); if (index > 0) comboBox.setSelectedIndex(index - 1); }
370
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
372
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
373
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if ((selectedItem != null) ? selectedItem.equals(o) : o == null) return i; } } } } // returns that no item is currently selected return -1; }
374
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; // returns that no item is currently selected return -1;
375
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); } else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
public void setSelectedIndex(int index) { if (index < -1 || index >= dataModel.getSize()) // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); } else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
376
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); } else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); else /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
377
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); } else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index));
378
public final void draw(Shape shape) { surface.draw(shape, transform, getColor(), mode); }
public final void draw(Shape shape) { surface.draw(shape, clip, transform, getColor(), mode); }
379
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) { try { final Raster raster = getCompatibleRaster(image); surface.drawCompatibleRaster(raster, 0, 0, x, y, raster.getWidth(), raster.getHeight(), bgcolor); return true; } catch (InterruptedException ex) { return false; } }
public final boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) { try { final Raster raster = getCompatibleRaster(image); surface.drawCompatibleRaster(raster, 0, 0, x, y, raster.getWidth(), raster.getHeight(), bgcolor); return true; } catch (InterruptedException ex) { return false; } }
380
public void drawRenderableImage(RenderableImage image, AffineTransform xform) { drawRenderedImage(image.createDefaultRendering(), xform); }
public final void drawRenderableImage(RenderableImage image, AffineTransform xform) { drawRenderedImage(image.createDefaultRendering(), xform); }
381
public void drawRenderedImage(RenderedImage image, AffineTransform xform) { // TODO Auto-generated method stub }
public final void drawRenderedImage(RenderedImage image, AffineTransform xform) { // TODO Auto-generated method stub }
382
public final void fill(Shape shape) { surface.fill(shape, transform, getColor(), mode); }
public final void fill(Shape shape) { surface.fill(shape, clip, transform, getColor(), mode); }
383
public AbstractGraphics(AbstractGraphics src) { this.bgColor = src.bgColor; this.fgColor = src.fgColor; this.xorColor = src.xorColor; this.font = src.font; this.clip = src.clip; this.stroke = src.stroke; this.transform = new AffineTransform(src.transform); this.paint = src.paint; this.composite = src.composite; }
public AbstractGraphics(AbstractGraphics src) { this.bgColor = src.bgColor; this.fgColor = src.fgColor; this.xorColor = src.xorColor; this.font = src.font; this.clip = src.clip; this.stroke = src.stroke; this.transform = new AffineTransform(src.transform); this.paint = src.paint; this.composite = src.composite; }
384
public void draw(Shape shape, AffineTransform tx, Color color, int mode);
public void draw(Shape shape, Shape clip, AffineTransform tx, Color color, int mode);
385
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) { // TODO Auto-generated method stub return false; }
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) { // TODO Auto-generated method stub return false; }
386
public JNodeImage(ImageProducer producer) { this.initProducer = producer; this.colorModel = ColorModel.getRGBdefault(); }
public JNodeImage(ImageProducer producer) { this.initProducer = producer; this.colorModel = ColorModel.getRGBdefault(); }
387
public void fill(Shape shape, AffineTransform tx, Color color, int mode);
public void fill(Shape shape, Shape clip, AffineTransform tx, Color color, int mode);
388
public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB) { this.ip = img.getSource(); this.x = x; this.y = y; width = w; height = h; // If width or height is negative, postpone pixel buffer // initialization until setDimensions is called back by ip. if (width >= 0 && height >= 0) { int_pixel_buffer = new int[width * height]; byte_pixel_buffer = new byte[width * height]; } this.forceRGB = forceRGB; }
public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB) { this.ip = img.getSource(); this.x = x; this.y = y; width = w; height = h; // If width or height is negative, postpone pixel buffer // initialization until setDimensions is called back by ip. if (width >= 0 && height >= 0) { int_pixel_buffer = new int[width * height]; byte_pixel_buffer = new byte[width * height]; } this.forceRGB = forceRGB; }
389
public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB) { this.ip = img.getSource(); this.x = x; this.y = y; width = w; height = h; // If width or height is negative, postpone pixel buffer // initialization until setDimensions is called back by ip. if (width >= 0 && height >= 0) { int_pixel_buffer = new int[width * height]; byte_pixel_buffer = new byte[width * height]; } this.forceRGB = forceRGB; }
public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB) { this.ip = img.getSource(); this.x = x; this.y = y; width = w; height = h; // If width or height is negative, postpone pixel buffer // initialization until setDimensions is called back by ip. if (width >= 0 && height >= 0) { int_pixel_buffer = new int[width * height]; byte_pixel_buffer = new byte[width * height]; } this.forceRGB = forceRGB; }
390
public boolean getScrollableTracksViewportHeight() { if (getParent() instanceof JViewport) return ((JViewport) getParent()).getHeight() > getPreferredSize().height; return false; }
public boolean getScrollableTracksViewportHeight() { if (getParent() instanceof JViewport) return getParent().getHeight() > getPreferredSize().height; return false; }
393
public boolean getScrollableTracksViewportWidth() { if (getParent() instanceof JViewport) return ((JViewport) getParent()).getWidth() > getPreferredSize().width; return false; }
public boolean getScrollableTracksViewportWidth() { if (getParent() instanceof JViewport) return getParent().getWidth() > getPreferredSize().width; return false; }
394
public String getToolTipText(MouseEvent event) { return getToolTipText(); }
public String getToolTipText(MouseEvent event) { return getToolTipText(); }
395
public void initPanel() throws Exception { setLayout(new BorderLayout()); contentPane = new JPanel(); contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.Y_AXIS)); add(contentPane,BorderLayout.NORTH); // define ppPanel panel JPanel ppp = new JPanel(); ppp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.print"))); defaultPrinter = new JCheckBox(LangTool.getString("sa.defaultPrinter")); if (getStringProperty("defaultPrinter").equals("Yes")) defaultPrinter.setSelected(true); ppp.add(defaultPrinter); //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); // will have to remember this for the next time. // Always set a page format before call setPrintable to // set the orientation. PageFormat pf = printJob.defaultPage(); pappyPort = pf.getPaper(); pappyLand = pf.getPaper(); // Portrait paper parameters if (getStringProperty("print.portWidth").length() != 0 && getStringProperty("print.portHeight").length() != 0 && getStringProperty("print.portImageWidth").length() != 0 && getStringProperty("print.portImageHeight").length() != 0 && getStringProperty("print.portImage.X").length() != 0 && getStringProperty("print.portImage.Y").length() != 0) { pappyPort.setSize(Double.parseDouble(getStringProperty("print.portWidth")), Double.parseDouble(getStringProperty("print.portHeight"))); pappyPort.setImageableArea(Double.parseDouble(getStringProperty("print.portImage.X")), Double.parseDouble(getStringProperty("print.portImage.Y")), Double.parseDouble(getStringProperty("print.portImageWidth")), Double.parseDouble(getStringProperty("print.portImageHeight"))); } // Landscape paper parameters if (getStringProperty("print.landWidth").length() != 0 && getStringProperty("print.landHeight").length() != 0 && getStringProperty("print.landImageWidth").length() != 0 && getStringProperty("print.landImageHeight").length() != 0 && getStringProperty("print.landImage.X").length() != 0 && getStringProperty("print.landImage.Y").length() != 0) { pappyLand.setSize(Double.parseDouble(getStringProperty("print.landWidth")), Double.parseDouble(getStringProperty("print.landHeight"))); pappyLand.setImageableArea(Double.parseDouble(getStringProperty("print.landImage.X")), Double.parseDouble(getStringProperty("print.landImage.Y")), Double.parseDouble(getStringProperty("print.landImageWidth")), Double.parseDouble(getStringProperty("print.landImageHeight"))); } // define page panel JPanel page = new JPanel(); page.setBorder(BorderFactory.createTitledBorder( LangTool.getString("sa.pageParameters"))); setPortAttributes = new JButton(LangTool.getString("sa.columns24")); setPortAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPortraitAttributes(); } }); setLandAttributes = new JButton(LangTool.getString("sa.columns132")); setLandAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getLandscapeAttributes(); } }); page.add(setPortAttributes); page.add(setLandAttributes); contentPane.add(ppp); contentPane.add(page);// contentPane.add(ppa); }
public void initPanel() throws Exception { setLayout(new BorderLayout()); contentPane = new JPanel(); contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.Y_AXIS)); add(contentPane,BorderLayout.NORTH); // define ppPanel panel JPanel ppp = new JPanel(); ppp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.print"))); defaultPrinter = new JCheckBox(LangTool.getString("sa.defaultPrinter")); if (getStringProperty("defaultPrinter").equals("Yes")) defaultPrinter.setSelected(true); ppp.add(defaultPrinter); //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); // will have to remember this for the next time. // Always set a page format before call setPrintable to // set the orientation. PageFormat pf = printJob.defaultPage(); pappyPort = pf.getPaper(); pappyLand = pf.getPaper(); // Portrait paper parameters if (getStringProperty("print.portWidth").length() != 0 && getStringProperty("print.portHeight").length() != 0 && getStringProperty("print.portImageWidth").length() != 0 && getStringProperty("print.portImageHeight").length() != 0 && getStringProperty("print.portImage.X").length() != 0 && getStringProperty("print.portImage.Y").length() != 0) { pappyPort.setSize(Double.parseDouble(getStringProperty("print.portWidth")), Double.parseDouble(getStringProperty("print.portHeight"))); pappyPort.setImageableArea(Double.parseDouble(getStringProperty("print.portImage.X")), Double.parseDouble(getStringProperty("print.portImage.Y")), Double.parseDouble(getStringProperty("print.portImageWidth")), Double.parseDouble(getStringProperty("print.portImageHeight"))); } // Landscape paper parameters if (getStringProperty("print.landWidth").length() != 0 && getStringProperty("print.landHeight").length() != 0 && getStringProperty("print.landImageWidth").length() != 0 && getStringProperty("print.landImageHeight").length() != 0 && getStringProperty("print.landImage.X").length() != 0 && getStringProperty("print.landImage.Y").length() != 0) { pappyLand.setSize(Double.parseDouble(getStringProperty("print.landWidth")), Double.parseDouble(getStringProperty("print.landHeight"))); pappyLand.setImageableArea(Double.parseDouble(getStringProperty("print.landImage.X")), Double.parseDouble(getStringProperty("print.landImage.Y")), Double.parseDouble(getStringProperty("print.landImageWidth")), Double.parseDouble(getStringProperty("print.landImageHeight"))); } // define page panel JPanel page = new JPanel(); page.setBorder(BorderFactory.createTitledBorder( LangTool.getString("sa.pageParameters"))); setPortAttributes = new JButton(LangTool.getString("sa.columns24")); setPortAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPortraitAttributes(); } }); setLandAttributes = new JButton(LangTool.getString("sa.columns132")); setLandAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getLandscapeAttributes(); } }); page.add(setPortAttributes); page.add(setLandAttributes); contentPane.add(ppp); contentPane.add(page);// contentPane.add(ppa); }
397
public static String toString(double d) { return toString(d, false); }
public static String toString(double d) { return VMDouble.toString(d, false); }
398
public static PrinterJob getPrinterJob() { // FIXME: Need to fix this to load a default implementation instance. return null; }
public static PrinterJob getPrinterJob() { // FIXME: Need to fix this to load a default implementation instance. return new NoPrinterJob(); }
399
public static double parseDouble(String str) { return new VMDouble(str).parse(); }
public static double parseDouble(String str) { return new VMDouble(str).parse(); }
400
int getRunLimit (AttributedCharacterIterator.Attribute attrib);
int getRunLimit();
401
int getRunStart (AttributedCharacterIterator.Attribute attrib);
int getRunStart();
402
public Gui5250SplitFrame(My5250 m) { super(m); enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } }
public Gui5250SplitFrame(My5250 m) { super(m); enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { log.warn("In constructor: "+e); } }
403
public JSplitPane(int newOrientation) { this(newOrientation, false, null, null); }
public JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent) { this(newOrientation, false, null, null); }
404
public JSplitPane(int newOrientation) { this(newOrientation, false, null, null); }
public JSplitPane(int newOrientation) { if (newOrientation != HORIZONTAL_SPLIT && newOrientation != VERTICAL_SPLIT) throw new IllegalArgumentException("orientation is invalid."); orientation = newOrientation; continuousLayout = newContinuousLayout; setLeftComponent(newLeftComponent); setRightComponent(newRightComponent); updateUI(); }
405
public static synchronized Configuration getConfiguration() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission (new AuthPermission ("getLoginConfiguration")); if (config == null) { String conf = (String) AccessController.doPrivileged (new PrivilegedAction() { public Object run() { return Security.getProperty ("login.configuration.provider"); } }); try { if (conf != null) config = (Configuration) Class.forName (conf).newInstance(); else config = new NullConfiguration(); } catch (Exception x) { config = new NullConfiguration(); } } return config; }
public static synchronized Configuration getConfiguration() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission (new AuthPermission ("getLoginConfiguration")); if (config == null) { String conf = (String) AccessController.doPrivileged (new PrivilegedAction() { public Object run() { return Security.getProperty ("login.configuration.provider"); } }); try { if (conf != null) config = (Configuration) Class.forName (conf).newInstance(); else config = new NullConfiguration(); } catch (Exception x) { config = new NullConfiguration(); } } return config; }
407
public BooleanSeqHolder(boolean[] initial_value) { value = initial_value; typecode.setLength(value.length); }
public BooleanSeqHolder() { value = initial_value; typecode.setLength(value.length); }
408
public BooleanSeqHolder(boolean[] initial_value) { value = initial_value; typecode.setLength(value.length); }
public BooleanSeqHolder(boolean[] initial_value) { value = initial_value; typecode.setLength(value.length); }
409
public void setResolveParent(AttributeSet parent) { attributes = StyleContext.this.addAttribute(attributes, ResolveAttribute, parent); fireStateChanged(); }
public void setResolveParent(AttributeSet parent) { if (parent != null) { attributes = StyleContext.this.addAttribute (attributes, ResolveAttribute, parent); } fireStateChanged(); }
410
public SimpleAttributeSet(AttributeSet a) { tab = new Hashtable(); if (a != null) addAttributes(a); }
public SimpleAttributeSet() { tab = new Hashtable(); if (a != null) addAttributes(a); }
411
public SimpleAttributeSet(AttributeSet a) { tab = new Hashtable(); if (a != null) addAttributes(a); }
public SimpleAttributeSet(AttributeSet a) { tab = new Hashtable(); if (a != null) addAttributes(a); }
412
public static Color getBackground(AttributeSet a) { if (a.isDefined(Background)) return (Color) a.getAttribute(Background); else return Color.BLACK; }
public static Color getBackground(AttributeSet a) { if (a.isDefined(Background)) return (Color) a.getAttribute(Background); else return Color.WHITE; }
413
public JIFSFile(String name, FSEntry parent) { this(name); this.parent = parent; refresh(); }
public JIFSFile(String name, FSEntry parent) { this(name); this.parent = parent; refresh(); }
414
public void store(int value) { }
public void store(ObjectReference ref) { }
415
static StringBuffer toString(int mod, StringBuffer r) { if (isPublic(mod)) r.append("public "); if (isProtected(mod)) r.append("protected "); if (isPrivate(mod)) r.append("private "); if (isAbstract(mod)) r.append("abstract "); if (isStatic(mod)) r.append("static "); if (isFinal(mod)) r.append("final "); if (isTransient(mod)) r.append("transient "); if (isVolatile(mod)) r.append("volatile "); if (isSynchronized(mod)) r.append("synchronized "); if (isNative(mod)) r.append("native "); if (isStrict(mod)) r.append("strictfp "); if (isInterface(mod)) r.append("interface "); // Trim trailing space. if ((mod & ALL_FLAGS) != 0) r.setLength(r.length() - 1); return r; }
public static String toString(int mod) { if (isPublic(mod)) r.append("public "); if (isProtected(mod)) r.append("protected "); if (isPrivate(mod)) r.append("private "); if (isAbstract(mod)) r.append("abstract "); if (isStatic(mod)) r.append("static "); if (isFinal(mod)) r.append("final "); if (isTransient(mod)) r.append("transient "); if (isVolatile(mod)) r.append("volatile "); if (isSynchronized(mod)) r.append("synchronized "); if (isNative(mod)) r.append("native "); if (isStrict(mod)) r.append("strictfp "); if (isInterface(mod)) r.append("interface "); // Trim trailing space. if ((mod & ALL_FLAGS) != 0) r.setLength(r.length() - 1); return r; }
416
static StringBuffer toString(int mod, StringBuffer r) { if (isPublic(mod)) r.append("public "); if (isProtected(mod)) r.append("protected "); if (isPrivate(mod)) r.append("private "); if (isAbstract(mod)) r.append("abstract "); if (isStatic(mod)) r.append("static "); if (isFinal(mod)) r.append("final "); if (isTransient(mod)) r.append("transient "); if (isVolatile(mod)) r.append("volatile "); if (isSynchronized(mod)) r.append("synchronized "); if (isNative(mod)) r.append("native "); if (isStrict(mod)) r.append("strictfp "); if (isInterface(mod)) r.append("interface "); // Trim trailing space. if ((mod & ALL_FLAGS) != 0) r.setLength(r.length() - 1); return r; }
static StringBuffer toString(int mod, StringBuffer r) { if (isPublic(mod)) r.append("public "); if (isProtected(mod)) r.append("protected "); if (isPrivate(mod)) r.append("private "); if (isAbstract(mod)) r.append("abstract "); if (isStatic(mod)) r.append("static "); if (isFinal(mod)) r.append("final "); if (isTransient(mod)) r.append("transient "); if (isVolatile(mod)) r.append("volatile "); if (isSynchronized(mod)) r.append("synchronized "); if (isNative(mod)) r.append("native "); if (isStrict(mod)) r.append("strictfp "); if (isInterface(mod)) r.append("interface "); // Trim trailing space. if ((mod & ALL_FLAGS) != 0) r.setLength(r.length() - 1); return r; }
417
private void loadConfigurationResource() { sesProps = new Properties(); if (configurationResource == null || configurationResource == "") configurationResource = "TN5250JDefaults.props"; try {// FileInputStream in = new FileInputStream(((GlobalConfigure)ConfigureFactory.getInstance()).settingsDirectory()// + configurationResource); FileInputStream in = new FileInputStream(configurationResource); //InputStream in = getClass().getClassLoader().getResourceAsStream(propFileName); sesProps.load(in); } catch (IOException ioe) { System.out.println("Information Message: Properties file is being " + "created for first time use: File name " + configurationResource); } catch (SecurityException se) { System.out.println(se.getMessage()); } }
private void loadConfigurationResource() { sesProps = new Properties(); if (configurationResource == null || configurationResource == "") configurationResource = "TN5250JDefaults.props"; try {// FileInputStream in = new FileInputStream(((GlobalConfigure)ConfigureFactory.getInstance()).settingsDirectory()// + configurationResource); FileInputStream in = new FileInputStream(configurationResource); //InputStream in = getClass().getClassLoader().getResourceAsStream(propFileName); sesProps.load(in); } catch (IOException ioe) { System.out.println("Information Message: Properties file is being " + "created for first time use: File name " + configurationResource); } catch (SecurityException se) { System.out.println(se.getMessage()); } }
418
private void loadConfigurationResource() { sesProps = new Properties(); if (configurationResource == null || configurationResource == "") configurationResource = "TN5250JDefaults.props"; try {// FileInputStream in = new FileInputStream(((GlobalConfigure)ConfigureFactory.getInstance()).settingsDirectory()// + configurationResource); FileInputStream in = new FileInputStream(configurationResource); //InputStream in = getClass().getClassLoader().getResourceAsStream(propFileName); sesProps.load(in); } catch (IOException ioe) { System.out.println("Information Message: Properties file is being " + "created for first time use: File name " + configurationResource); } catch (SecurityException se) { System.out.println(se.getMessage()); } }
private void loadConfigurationResource() { sesProps = new Properties(); if (configurationResource == null || configurationResource == "") configurationResource = "TN5250JDefaults.props"; try {// FileInputStream in = new FileInputStream(((GlobalConfigure)ConfigureFactory.getInstance()).settingsDirectory()// + configurationResource); FileInputStream in = new FileInputStream(configurationResource); //InputStream in = getClass().getClassLoader().getResourceAsStream(propFileName); sesProps.load(in); } catch (IOException ioe) { System.out.println("Information Message: Properties file is being " + "created for first time use: File name " + configurationResource); } catch (SecurityException se) { System.out.println(se.getMessage()); } }
419
public int charWidth(char ch) { return 1; }
public int charWidth(int ch) { return 1; }
422
public int charWidth(char ch) { return 1; }
public int charWidth(char ch) { char[] chars = Character.toChars(ch); return charsWidth(chars, 0, chars.length); }
423
private static void incomingMessageCall(UnicastConnection conn) throws IOException { ObjectInputStream in = conn.getObjectInputStream(); ObjID objid = ObjID.read(in); int method = in.readInt(); long hash = in.readLong();//System.out.println("ObjID: " + objid + ", method: " + method + ", hash: " + hash); // Use the objid to locate the relevant UnicastServerRef UnicastServerRef uref = (UnicastServerRef)objects.get(objid); Object returnval; int returncode = RETURN_ACK; // returnval is from Method.invoke(), so we must check the return class to see // if it's primitive type Class returncls = null; if (uref != null) { try { // Dispatch the call to it. returnval = uref.incomingMessageCall(conn, method, hash); returncls = uref.getMethodReturnType(method, hash); } catch (Exception e) { returnval = e; returncode = RETURN_NACK; } } else { returnval = new NoSuchObjectException(""); returncode = RETURN_NACK; } conn.getDataOutputStream().writeByte(MESSAGE_CALL_ACK); ObjectOutputStream out = conn.getObjectOutputStream(); out.writeByte(returncode); (new UID()).write(out); if(returnval != null && returncls != null) ((RMIObjectOutputStream)out).writeValue(returnval, returncls); else if (!(returnval instanceof RMIVoidValue)) out.writeObject(returnval); out.flush();}
private static void incomingMessageCall(UnicastConnection conn) throws IOException { ObjectInputStream in = conn.startObjectInputStream(); ObjID objid = ObjID.read(in); int method = in.readInt(); long hash = in.readLong();//System.out.println("ObjID: " + objid + ", method: " + method + ", hash: " + hash); // Use the objid to locate the relevant UnicastServerRef UnicastServerRef uref = (UnicastServerRef)objects.get(objid); Object returnval; int returncode = RETURN_ACK; // returnval is from Method.invoke(), so we must check the return class to see // if it's primitive type Class returncls = null; if (uref != null) { try { // Dispatch the call to it. returnval = uref.incomingMessageCall(conn, method, hash); returncls = uref.getMethodReturnType(method, hash); } catch (Exception e) { returnval = e; returncode = RETURN_NACK; } } else { returnval = new NoSuchObjectException(""); returncode = RETURN_NACK; } conn.getDataOutputStream().writeByte(MESSAGE_CALL_ACK); ObjectOutputStream out = conn.getObjectOutputStream(); out.writeByte(returncode); (new UID()).write(out); if(returnval != null && returncls != null) ((RMIObjectOutputStream)out).writeValue(returnval, returncls); else if (!(returnval instanceof RMIVoidValue)) out.writeObject(returnval); out.flush();}
425
private static void incomingMessageCall(UnicastConnection conn) throws IOException { ObjectInputStream in = conn.getObjectInputStream(); ObjID objid = ObjID.read(in); int method = in.readInt(); long hash = in.readLong();//System.out.println("ObjID: " + objid + ", method: " + method + ", hash: " + hash); // Use the objid to locate the relevant UnicastServerRef UnicastServerRef uref = (UnicastServerRef)objects.get(objid); Object returnval; int returncode = RETURN_ACK; // returnval is from Method.invoke(), so we must check the return class to see // if it's primitive type Class returncls = null; if (uref != null) { try { // Dispatch the call to it. returnval = uref.incomingMessageCall(conn, method, hash); returncls = uref.getMethodReturnType(method, hash); } catch (Exception e) { returnval = e; returncode = RETURN_NACK; } } else { returnval = new NoSuchObjectException(""); returncode = RETURN_NACK; } conn.getDataOutputStream().writeByte(MESSAGE_CALL_ACK); ObjectOutputStream out = conn.getObjectOutputStream(); out.writeByte(returncode); (new UID()).write(out); if(returnval != null && returncls != null) ((RMIObjectOutputStream)out).writeValue(returnval, returncls); else if (!(returnval instanceof RMIVoidValue)) out.writeObject(returnval); out.flush();}
private static void incomingMessageCall(UnicastConnection conn) throws IOException { ObjectInputStream in = conn.getObjectInputStream(); ObjID objid = ObjID.read(in); int method = in.readInt(); long hash = in.readLong();//System.out.println("ObjID: " + objid + ", method: " + method + ", hash: " + hash); // Use the objid to locate the relevant UnicastServerRef UnicastServerRef uref = (UnicastServerRef)objects.get(objid); Object returnval; int returncode = RETURN_ACK; // returnval is from Method.invoke(), so we must check the return class to see // if it's primitive type Class returncls = null; if (uref != null) { try { // Dispatch the call to it. returnval = uref.incomingMessageCall(conn, method, hash); returncls = uref.getMethodReturnType(method, hash); } catch (Exception e) { returnval = e; returncode = RETURN_NACK; } } else { returnval = new NoSuchObjectException(""); returncode = RETURN_NACK; } conn.getDataOutputStream().writeByte(MESSAGE_CALL_ACK); ObjectOutputStream out = conn.startObjectOutputStream(); out.writeByte(returncode); (new UID()).write(out); if(returnval != null && returncls != null) ((RMIObjectOutputStream)out).writeValue(returnval, returncls); else if (!(returnval instanceof RMIVoidValue)) out.writeObject(returnval); out.flush();}
426
private static void incomingMessageCall(UnicastConnection conn) throws IOException { ObjectInputStream in = conn.getObjectInputStream(); ObjID objid = ObjID.read(in); int method = in.readInt(); long hash = in.readLong();//System.out.println("ObjID: " + objid + ", method: " + method + ", hash: " + hash); // Use the objid to locate the relevant UnicastServerRef UnicastServerRef uref = (UnicastServerRef)objects.get(objid); Object returnval; int returncode = RETURN_ACK; // returnval is from Method.invoke(), so we must check the return class to see // if it's primitive type Class returncls = null; if (uref != null) { try { // Dispatch the call to it. returnval = uref.incomingMessageCall(conn, method, hash); returncls = uref.getMethodReturnType(method, hash); } catch (Exception e) { returnval = e; returncode = RETURN_NACK; } } else { returnval = new NoSuchObjectException(""); returncode = RETURN_NACK; } conn.getDataOutputStream().writeByte(MESSAGE_CALL_ACK); ObjectOutputStream out = conn.getObjectOutputStream(); out.writeByte(returncode); (new UID()).write(out); if(returnval != null && returncls != null) ((RMIObjectOutputStream)out).writeValue(returnval, returncls); else if (!(returnval instanceof RMIVoidValue)) out.writeObject(returnval); out.flush();}
private static void incomingMessageCall(UnicastConnection conn) throws IOException { ObjectInputStream in = conn.getObjectInputStream(); ObjID objid = ObjID.read(in); int method = in.readInt(); long hash = in.readLong();//System.out.println("ObjID: " + objid + ", method: " + method + ", hash: " + hash); // Use the objid to locate the relevant UnicastServerRef UnicastServerRef uref = (UnicastServerRef)objects.get(objid); Object returnval; int returncode = RETURN_ACK; // returnval is from Method.invoke(), so we must check the return class to see // if it's primitive type Class returncls = null; if (uref != null) { try { // Dispatch the call to it. returnval = uref.incomingMessageCall(conn, method, hash); returncls = uref.getMethodReturnType(method, hash); } catch (Exception e) { returnval = e; returncode = RETURN_NACK; } } else { returnval = new NoSuchObjectException(""); returncode = RETURN_NACK; } conn.getDataOutputStream().writeByte(MESSAGE_CALL_ACK); ObjectOutputStream out = conn.getObjectOutputStream(); out.writeByte(returncode); (new UID()).write(out); if(returnval != null && returncls != null) ((RMIObjectOutputStream)out).writeValue(returnval, returncls); else if (!(returnval instanceof RMIVoidValue || returncls == Void.TYPE)) out.writeObject(returnval); out.flush();}
427
ObjectInputStream getObjectInputStream() throws IOException { if (oin == null) { oin = new RMIObjectInputStream(din); } return (oin);}
ObjectInputStream getObjectInputStream() throws IOException { if (oin == null) { throw new IOException("no ObjectInputtream for reading more objects"); } return (oin);}
428
ObjectOutputStream getObjectOutputStream() throws IOException { if (oout == null) { oout = new RMIObjectOutputStream(dout); } return (oout);}
ObjectOutputStream getObjectOutputStream() throws IOException { if (oout == null) { throw new IOException("no ObjectOutputStream for sending more objects"); } return (oout);}
429
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }}
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }}
430
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }}
public UID() { synchronized (lock) { if (nextCount == Short.MAX_VALUE) { long newtime; for (;;) { newtime = System.currentTimeMillis(); if (newtime - baseTime > 1000) { break; } try { Thread.sleep(1000); } catch (InterruptedException _) { } } baseTime = newtime; nextCount = Short.MIN_VALUE; } count = nextCount++; unique = uniqueNr; time = baseTime; }}
431