rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
throws NotImplementedException | public boolean isEnabled() throws NotImplementedException { // TODO: Implement this properly return false; } | |
return false; | return (tree != null) && tree.isEnabled(); | public boolean isEnabled() throws NotImplementedException { // TODO: Implement this properly return false; } |
public TreeIncrementAction(int direction, String name) throws NotImplementedException | public TreeIncrementAction(int dir, String name) | public TreeIncrementAction(int direction, String name) throws NotImplementedException { // TODO: Implement this properly } |
direction = dir; putValue(Action.NAME, name); | public TreeIncrementAction(int direction, String name) throws NotImplementedException { // TODO: Implement this properly } | |
String command = e.getActionCommand(); | String command = (String) getValue(Action.NAME); | public void actionPerformed(ActionEvent e) { TreePath currentPath = tree.getLeadSelectionPath(); int currentRow; if (currentPath != null) currentRow = treeState.getRowForPath(currentPath); else currentRow = 0; int rows = treeState.getRowCount(); int nextRow = currentRo... |
putValue(Action.NAME, name); | public TreePageAction(int direction, String name) { this.direction = direction; } | |
throws NotImplementedException | public void actionPerformed(ActionEvent e) throws NotImplementedException { // TODO: Implement this properly. } | |
String command = (String) getValue(Action.NAME); boolean extendSelection = command.equals("scrollUpExtendSelection") || command.equals("scrollDownExtendSelection"); boolean changeSelection = command.equals("scrollUpChangeSelection") || command.equals("scrollDownChangeSelection"); if (!extendSelection && !changeSelect... | public void actionPerformed(ActionEvent e) throws NotImplementedException { // TODO: Implement this properly. } | |
throws NotImplementedException | public boolean isEnabled() throws NotImplementedException { // FIXME: Not implemented. return false; } | |
return false; | return (tree != null) && tree.isEnabled(); | public boolean isEnabled() throws NotImplementedException { // FIXME: Not implemented. return false; } |
putValue(Action.NAME, name); | public TreeToggleAction(String name) { // Nothing to do here. } | |
int selected = tree.getLeadSelectionRow(); if (selected != -1 && isLeaf(selected)) { TreePath anchorPath = tree.getAnchorSelectionPath(); TreePath leadPath = tree.getLeadSelectionPath(); toggleExpandState(getPathForRow(tree, selected)); tree.setLeadSelectionPath(leadPath); tree.setAnchorSelectionPath(anchorPath); } | public void actionPerformed(ActionEvent e) throws NotImplementedException { // TODO: Implement this properly. } | |
putValue(Action.NAME, name); | public TreeTraverseAction(int direction, String name) { this.direction = direction; } | |
if (e.getActionCommand().equals("selectParent")) | String command = (String) getValue(Action.NAME); if (command.equals("selectParent")) | public void actionPerformed(ActionEvent e) { TreePath current = tree.getLeadSelectionPath(); if (current == null) return; if (e.getActionCommand().equals("selectParent")) { if (current == null) return; if (tree.isExpanded(current)) { ... |
else if (e.getActionCommand().equals("selectChild")) | else if (command.equals("selectChild")) | public void actionPerformed(ActionEvent e) { TreePath current = tree.getLeadSelectionPath(); if (current == null) return; if (e.getActionCommand().equals("selectParent")) { if (current == null) return; if (tree.isExpanded(current)) { ... |
propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseListener = createMouseListener(); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentL... | public BasicTreeUI() { validCachedPreferredSize = false; drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionLis... | |
toggleExpandState(path); | handleExpandControlClick(path, mouseX, mouseY); | protected void checkForClickInExpandControl(TreePath path, int mouseX, int mouseY) { if (isLocationInExpandControl(path, mouseX, mouseY)) toggleExpandState(path); } |
throws NotImplementedException | protected void completeUIInstall() throws NotImplementedException { // TODO: Implement this properly. } | |
setShowsRootHandles(tree.getShowsRootHandles()); updateRenderer(); updateDepthOffset(); setSelectionModel(tree.getSelectionModel()); treeState = createLayoutCache(); treeSelectionModel.setRowMapper(treeState); configureLayoutCache(); updateSize(); | protected void completeUIInstall() throws NotImplementedException { // TODO: Implement this properly. } | |
throws NotImplementedException | protected void completeUIUninstall() throws NotImplementedException { // TODO: Implement this properly. } | |
tree = null; | protected void completeUIUninstall() throws NotImplementedException { // TODO: Implement this properly. } | |
if (currentCellRenderer != null) return new DefaultTreeCellEditor( tree, (DefaultTreeCellRenderer) currentCellRenderer, cellEditor); return new DefaultTreeCellEditor( tree, (DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor); | DefaultTreeCellEditor ed; if (currentCellRenderer != null && currentCellRenderer instanceof DefaultTreeCellRenderer) ed = new DefaultTreeCellEditor(tree, (DefaultTreeCellRenderer) currentCellRenderer); else ed = new DefaultTreeCellEditor(tree, null); return ed; | protected TreeCellEditor createDefaultCellEditor() { if (currentCellRenderer != null) return new DefaultTreeCellEditor( tree, (DefaultTreeCellRenderer) currentCellRenderer, cellEditor); return... |
InputMap focusInputMap = (InputMap) UIManager.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMapUIResource(); | InputMap focusInputMap = (InputMap) SharedUIDefaults.get("Tree.focusInputMap"); SwingUtilities.replaceUIInputMap(tree, JComponent.WHEN_FOCUSED, focusInputMap); InputMap ancestorInputMap = (InputMap) SharedUIDefaults.get("Tree.ancestorInputMap"); SwingUtilities.replaceUIInputMap(tree, JComponent.WHEN_ANCESTOR_OF_FOCUSED... | protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMapUIResource(); action = new TreeAction(); Object keys[] = focusInputMap.allKeys(); ... |
Object keys[] = focusInputMap.allKeys(); | protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMapUIResource(); action = new TreeAction(); Object keys[] = focusInputMap.allKeys(); ... | |
for (int i = 0; i < keys.length; i++) { parentInputMap.put( KeyStroke.getKeyStroke( ((KeyStroke) keys[i]).getKeyCode(), convertModifiers(((KeyStroke) keys[i]).getModifiers())), (String) focusInputMap.get((KeyStroke) keys[i])); parentInputMap.put( KeyStroke.getKeyStroke( ((KeyStroke) keys[i]).getKeyCode(), ((KeyStroke)... | SwingUtilities.replaceUIActionMap(tree, getActionMap()); | protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMapUIResource(); action = new TreeAction(); Object keys[] = focusInputMap.allKeys(); ... |
parentInputMap.setParent(tree.getInputMap( JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).getParent()); parentActionMap.setParent(tree.getActionMap().getParent()); tree.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).setParent( parentInputMap); tree.getActionMap().setParent(parentActionMap); } | protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMapUIResource(); action = new TreeAction(); Object keys[] = focusInputMap.allKeys(); ... | |
tree.addPropertyChangeListener(selectionModelPropertyChangeListener); | selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); if (treeSelectionModel != null && selectionModelPropertyChangeListener != null) { treeSelectionModel.addPropertyChangeListener (selectionModelPropertyChangeListener); } componentListener = createComponentListener(); | protected void installListeners() { tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionMod... |
cellEditorListener = createCellEditorListener(); | protected void installListeners() { tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionMod... | |
treeModel = tree.getModel(); | public void installUI(JComponent c) { tree = (JTree) c; treeModel = tree.getModel(); prepareForUIInstall(); super.installUI(c); installDefaults(); installComponents(); installKeyboardActions(); installListeners(); setCellEditor(createDefaultCellEditor()); createdCellEditor = true; is... | |
super.installUI(c); | public void installUI(JComponent c) { tree = (JTree) c; treeModel = tree.getModel(); prepareForUIInstall(); super.installUI(c); installDefaults(); installComponents(); installKeyboardActions(); installListeners(); setCellEditor(createDefaultCellEditor()); createdCellEditor = true; is... | |
setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = false; setModel(tree.getModel()); treeSelectionModel = tree.getSelectionModel(); setRootVisible(tree.isRootVisible()); treeState.setRootVisible(tree.isRootVisible()); updateExpandedDescendants(new TreePath(new Object[] { treeModel.getRoot(... | public void installUI(JComponent c) { tree = (JTree) c; treeModel = tree.getModel(); prepareForUIInstall(); super.installUI(c); installDefaults(); installComponents(); installKeyboardActions(); installListeners(); setCellEditor(createDefaultCellEditor()); createdCellEditor = true; is... | |
int row = getRowForPath(tree, path); if (! isLeaf(row)) | if (! treeModel.isLeaf(path.getLastPathComponent())) | protected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY) { boolean cntlClick = false; int row = getRowForPath(tree, path); if (! isLeaf(row)) { Rectangle bounds = getPathBounds(tree, path); if (hasControlIcons() ... |
Rectangle bounds = getPathBounds(tree, path); | int width = 8; Icon expandedIcon = getExpandedIcon(); if (expandedIcon != null) width = expandedIcon.getIconWidth(); | protected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY) { boolean cntlClick = false; int row = getRowForPath(tree, path); if (! isLeaf(row)) { Rectangle bounds = getPathBounds(tree, path); if (hasControlIcons() ... |
if (hasControlIcons() && (mouseX < bounds.x) && (mouseX > (bounds.x - getCurrentControlIcon(path).getIconWidth() - gap))) cntlClick = true; | Insets i = tree.getInsets(); int left = getRowX(tree.getRowForPath(path), path.getPathCount() - 1) -getRightChildIndent() - width / 2 + i.left; cntlClick = mouseX >= left && mouseX <= left + width; | protected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY) { boolean cntlClick = false; int row = getRowForPath(tree, path); if (! isLeaf(row)) { Rectangle bounds = getPathBounds(tree, path); if (hasControlIcons() ... |
throws NotImplementedException | protected boolean isToggleEvent(MouseEvent event) throws NotImplementedException { // FIXME: Not implemented. return true; } | |
return true; | boolean toggle = false; if (SwingUtilities.isLeftMouseButton(event)) { int clickCount = tree.getToggleClickCount(); if (clickCount > 0 && event.getClickCount() == clickCount) toggle = true; } return toggle; | protected boolean isToggleEvent(MouseEvent event) throws NotImplementedException { // FIXME: Not implemented. return true; } |
throws NotImplementedException | protected void prepareForUIInstall() throws NotImplementedException { // TODO: Implement this properly. } | |
lastSelectedRow = -1; preferredSize = new Dimension(); largeModel = tree.isLargeModel(); preferredSize = new Dimension(); setModel(tree.getModel()); | protected void prepareForUIInstall() throws NotImplementedException { // TODO: Implement this properly. } | |
throws NotImplementedException | protected void prepareForUIUninstall() throws NotImplementedException { // TODO: Implement this properly. } | |
tree.setAnchorSelectionPath(path); | if (isToggleEvent(event)) toggleExpandState(path); | protected void selectPathForEvent(TreePath path, MouseEvent event) { if (isToggleSelectionEvent(event)) { // The event selects or unselects the clicked row. if (tree.isPathSelected(path)) tree.removeSelectionPath(path); else { tree.addSelectionPath(path); ... |
tree.setModel(model); | completeEditing(); if (treeModel != null && treeModelListener != null) treeModel.removeTreeModelListener(treeModelListener); | protected void setModel(TreeModel model) { tree.setModel(model); treeModel = tree.getModel(); treeState.setModel(treeModel); } |
updateLayoutCacheExpandedNodes(); updateSize(); } | protected void setModel(TreeModel model) { tree.setModel(model); treeModel = tree.getModel(); treeState.setModel(treeModel); } | |
tree.setShowsRootHandles(newValue); | completeEditing(); updateDepthOffset(); if (treeState != null) { treeState.invalidateSizes(); updateSize(); } | protected void setShowsRootHandles(boolean newValue) { tree.setShowsRootHandles(newValue); } |
tree = null; | public void uninstallUI(JComponent c) { prepareForUIUninstall(); uninstallDefaults(); uninstallKeyboardActions(); uninstallListeners(); tree = null; uninstallComponents(); completeUIUninstall(); } | |
if (treeModel != null) | if (treeModel != null && treeModel.getRoot() != null) | protected void updateLayoutCacheExpandedNodes() { if (treeModel != null) updateExpandedDescendants(new TreePath(treeModel.getRoot())); } |
updateCellEditor(); | protected void updateRenderer() { if (tree != null) currentCellRenderer = tree.getCellRenderer(); if (currentCellRenderer == null) currentCellRenderer = createDefaultCellRenderer(); } | |
new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return BasicIconFactory.getCheckBoxIcon(); } }, "CheckBox.checkIcon", | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa... | |
return BasicIconFactory.getMenuItemCheckIcon(); | return BasicIconFactory.getCheckBoxIcon(); | public Object createValue(UIDefaults def) { return BasicIconFactory.getMenuItemCheckIcon(); } |
public Object createValue(UIDefaults table) { Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Color(122, 138, 153); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.WHIT... | public Object createValue(UIDefaults def) { return BasicIconFactory.getMenuItemCheckIcon(); } | public Object createValue(UIDefaults table) { Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Color(122, 138, 153); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,... |
public Object createValue(UIDefaults def) { return new IconUIResource(BasicIconFactory.createEmptyFrameIcon()); } | public Object createValue(UIDefaults table) { Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Color(122, 138, 153); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.WHIT... | public Object createValue(UIDefaults def) { return new IconUIResource(BasicIconFactory.createEmptyFrameIcon()); } |
return BasicIconFactory.getRadioButtonIcon(); | return new IconUIResource(BasicIconFactory.createEmptyFrameIcon()); | public Object createValue(UIDefaults def) { return BasicIconFactory.getRadioButtonIcon(); } |
os.writePUSH(SoftByteCodes.EX_CLASSCAST); os.writePUSH(0); invokeJavaMethod(context.getSystemExceptionMethod()); final RefItem exi = vstack.popRef(); assertCondition(exi.uses(EAX), "item must be in eax"); exi.release(eContext); helper.writeJumpTableCALL(X86JumpTable.VM_ATHROW_OFS); | invokeJavaMethod(context.getClassCastFailedMethod()); | public final void visit_checkcast(VmConstClass classRef) { // Resolve classRef classRef.resolve(loader); final VmType resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // ClassRef is an interface or array, do the slow test ... |
try { return new ObjectInputStream( new ByteArrayInputStream( data ) ).readObject(); } catch ( Exception e ) { e.printStackTrace(); throw new RuntimeException ( e.toString() ); } | try { CertificateFactory fact = CertificateFactory.getInstance(type); return fact.generateCertificate(new ByteArrayInputStream(data)); } catch (Exception e) { throw new InvalidObjectException(e.toString()); } | protected Object readResolve() throws ObjectStreamException { try { return new ObjectInputStream( new ByteArrayInputStream( data ) ).readObject(); } catch ( Exception e ) { e.printStackTrace(); throw new RuntimeException ( e.toString() ); } } |
for (int mX = x + (xOff); mX < (x + w); mX += 4) | for (int mX = x + xOff; mX < (x + w); mX += 4) | static void fillMetalPattern(Component c, Graphics g, int x, int y, int w, int h, Color light, Color dark) { //if (g instanceof Graphics2D) if (false /* we don't have propper g2d in jnode yet, use the simple graphics here*/ && g instanceof Graphics2D) fillMetalPat... |
ValueBaseHelper.write(this, value); | Vio.write(this, value); | public void write_value(Serializable value) { ValueBaseHelper.write(this, value); } |
return getMessage (); | return charsetName; | public String getCharsetName () { return getMessage (); } |
catch (DomEx e) | catch (DomDOMException e) | public void removeAttribute(String name) { if (attributes == null) { return; } try { attributes.removeNamedItem(name); } catch (DomEx e) { if (e.code != DomEx.NOT_FOUND_ERR) { throw e; } } } |
if (e.code != DomEx.NOT_FOUND_ERR) | if (e.code != DOMException.NOT_FOUND_ERR) | public void removeAttribute(String name) { if (attributes == null) { return; } try { attributes.removeNamedItem(name); } catch (DomEx e) { if (e.code != DomEx.NOT_FOUND_ERR) { throw e; } } } |
throw new DomEx(DomEx.NOT_FOUND_ERR, localPart, null, 0); | throw new DomDOMException(DOMException.NOT_FOUND_ERR, localPart, null, 0); | public void removeAttributeNS(String namespace, String localPart) { if (attributes == null) { throw new DomEx(DomEx.NOT_FOUND_ERR, localPart, null, 0); } attributes.removeNamedItemNS (namespace, localPart); } |
throw new DomEx(DomEx.NOT_FOUND_ERR, null, node, 0); | throw new DomDOMException(DOMException.NOT_FOUND_ERR, null, node, 0); | public Attr removeAttributeNode(Attr node) { if (attributes == null) { throw new DomEx(DomEx.NOT_FOUND_ERR, null, node, 0); } return (Attr) attributes.removeNamedItem(node.getNodeName()); } |
throw new DomEx(DomEx.NAMESPACE_ERR, | throw new DomDOMException(DOMException.NAMESPACE_ERR, | public void setAttributeNS(String uri, String aname, String value) { if (("xmlns".equals (aname) || aname.startsWith ("xmlns:")) && !XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals (uri)) { throw new DomEx(DomEx.NAMESPACE_ERR, "setting xmlns attribute to illegal value", this, ... |
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); | throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); | public void setIdAttributeNode(Attr attr, boolean isId) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (attr == null || attr.getOwnerElement() != this) { throw new DomEx(DomEx.NOT_FOUND_ERR); } if (isId) { if (userIdAttrs == null) ... |
throw new DomEx(DomEx.NOT_FOUND_ERR); | throw new DomDOMException(DOMException.NOT_FOUND_ERR); | public void setIdAttributeNode(Attr attr, boolean isId) { if (readonly) { throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); } if (attr == null || attr.getOwnerElement() != this) { throw new DomEx(DomEx.NOT_FOUND_ERR); } if (isId) { if (userIdAttrs == null) ... |
public DefaultBoundedRangeModel() { setRangeProperties(0, 0, 0, 100, false); } | public DefaultBoundedRangeModel() { maximum = 100; } | public DefaultBoundedRangeModel() { setRangeProperties(0, 0, 0, 100, false); } // DefaultBoundedRangeModel() |
protected void fireStateChanged() { | protected void fireStateChanged() { Object[] listeners; | protected void fireStateChanged() { // Variables ChangeListener listener; EventListener[] listeners; int index; // Get Listeners listeners = listenerList.getListeners(ChangeListener.class); // Process Listeners for (index = 0; index < listeners.length; index++) { listener = (ChangeListener) listener... |
ChangeListener listener; EventListener[] listeners; int index; listeners = listenerList.getListeners(ChangeListener.class); for (index = 0; index < listeners.length; index++) { listener = (ChangeListener) listeners[index]; listener.stateChanged(changeEvent); } } | listeners = listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) if (listeners[i] == ChangeListener.class) { if (changeEvent == null) changeEvent = new ChangeEvent(this); ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent); } } | protected void fireStateChanged() { // Variables ChangeListener listener; EventListener[] listeners; int index; // Get Listeners listeners = listenerList.getListeners(ChangeListener.class); // Process Listeners for (index = 0; index < listeners.length; index++) { listener = (ChangeListener) listener... |
public EventListener[] getListeners(Class c) { return listenerList.getListeners(c); } | public EventListener[] getListeners(Class listenerType) { return listenerList.getListeners(listenerType); } | public EventListener[] getListeners(Class c) { return listenerList.getListeners(c); } // getListeners() |
public void setExtent(int extent) { | public void setExtent(int extent) { extent = Math.max(extent, 0); if (value + extent > maximum) extent = maximum - value; | public void setExtent(int extent) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid extent property set"); } // if // Set Extent this.extent = extent; // Notification fireStateChanged(); } // setExtent() |
if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid extent property set"); } this.extent = extent; fireStateChanged(); } | if (extent != this.extent) { this.extent = extent; fireStateChanged(); } } | public void setExtent(int extent) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid extent property set"); } // if // Set Extent this.extent = extent; // Notification fireStateChanged(); } // setExtent() |
public void setMaximum(int maximum) { if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid maximum property set"); } | public void setMaximum(int maximum) { int value, extent, minimum; | public void setMaximum(int maximum) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid maximum property set"); } // if // Set Maximum this.maximum = maximum; // Notification fireStateChanged(); } // setMaxim... |
this.maximum = maximum; | minimum = Math.min(this.minimum, maximum); extent = Math.min(this.extent, maximum - minimum); value = Math.min(this.value, maximum - extent); | public void setMaximum(int maximum) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid maximum property set"); } // if // Set Maximum this.maximum = maximum; // Notification fireStateChanged(); } // setMaxim... |
fireStateChanged(); } | setRangeProperties(value, extent, minimum, maximum, isAdjusting); } | public void setMaximum(int maximum) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid maximum property set"); } // if // Set Maximum this.maximum = maximum; // Notification fireStateChanged(); } // setMaxim... |
public void setMinimum(int minimum) { if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid minimum property set"); } this.minimum = minimum; fireStateChanged(); | public void setMinimum(int minimum) { int value, maximum; | public void setMinimum(int minimum) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid minimum property set"); } // if // Set Minimum this.minimum = minimum; // Notification fireStateChanged(); } // setM... |
} | maximum = Math.max(minimum, this.maximum); value = Math.max(minimum, this.value); setRangeProperties(value, extent, minimum, maximum, isAdjusting); } | public void setMinimum(int minimum) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid minimum property set"); } // if // Set Minimum this.minimum = minimum; // Notification fireStateChanged(); } // setM... |
int maximum, boolean isAdjusting) { if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid property set"); } | int maximum, boolean isAdjusting) { minimum = Math.min(Math.min(minimum, maximum), value); maximum = Math.max(value, maximum); if (extent + value > maximum) extent = maximum - value; extent = Math.max(0, extent); | public void setRangeProperties(int value, int extent, int minimum, int maximum, boolean isAdjusting) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid property set"); } // if // Set Data this.value = valu... |
this.value = value; this.extent = extent; this.minimum = minimum; this.maximum = maximum; this.isAdjusting = isAdjusting; | if ((value == this.value) && (extent == this.extent) && (minimum == this.minimum) && (maximum == this.maximum) && (isAdjusting == this.isAdjusting)) return; this.value = value; this.extent = extent; this.minimum = minimum; this.maximum = maximum; this.isAdjusting = isAdjusting; | public void setRangeProperties(int value, int extent, int minimum, int maximum, boolean isAdjusting) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid property set"); } // if // Set Data this.value = valu... |
public void setValue(int value) { if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid value property set"); } this.value = value; | public void setValue(int value) { value = Math.max(minimum, value); if (value + extent > maximum) value = maximum - extent; | public void setValue(int value) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid value property set"); } // if // Set Value this.value = value; // Notification fireStateChanged(); } // setValue() |
fireStateChanged(); } | if (value != this.value) { this.value = value; fireStateChanged(); } } | public void setValue(int value) { // Validate Constraints if (minimum > value || value > (value + extent) || (value + extent) > maximum) { throw new IllegalArgumentException("Invalid value property set"); } // if // Set Value this.value = value; // Notification fireStateChanged(); } // setValue() |
public void setValueIsAdjusting(boolean isAdjusting) { this.isAdjusting = isAdjusting; | public void setValueIsAdjusting(boolean isAdjusting) { if (isAdjusting == this.isAdjusting) return; | public void setValueIsAdjusting(boolean isAdjusting) { // Set isAdjusting this.isAdjusting = isAdjusting; // Notification fireStateChanged(); } // setValueIsAdjusting() |
fireStateChanged(); } | this.isAdjusting = isAdjusting; fireStateChanged(); } | public void setValueIsAdjusting(boolean isAdjusting) { // Set isAdjusting this.isAdjusting = isAdjusting; // Notification fireStateChanged(); } // setValueIsAdjusting() |
public String toString() { return null; } | public String toString() { return getClass().getName() + "[value=" + value + ", extent=" + extent + ", min=" + minimum + ", max=" + maximum + ", adj=" + isAdjusting + ']'; } | public String toString() { return null; // TODO } // toString() |
throw new IOException("Exec error", ex); | final IOException ioe = new IOException("Exec error"); ioe.initCause(ex); throw ioe; | public Process exec(String[] cmdarray, String[] envp) throws IOException { String command = cmdarray[0]; SecurityManager s = System.getSecurityManager(); if (s != null) s.checkExec(command); if (envp == null) { envp = new String[0]; } String mainClassName = cmdarray[0]; String[] cmdArgs = new String[cmdarra... |
static void write(OutputStream ostream, short value) | public static void write(OutputStream ostream, short value) | static void write(OutputStream ostream, short value) { ostream.write_short(value); } |
assembler.putConstant(label, ref.getOffset()); | assembler.putConstant(label, ref.getOffset() + (int)asm.getBaseAddr()); | private void defineLabel(String label, X86Assembler asm) { try { Label lab = new Label(label); labels.put(label, lab); NativeStream.ObjectRef ref = asm.setObjectRef(lab); assembler.putConstant(label, ref.getOffset()); } catch (Exception e) { e.pri... |
public DefaultTextField(Border border) | public DefaultTextField(Border aBorder) | public DefaultTextField(Border border) { this.border = border; } |
this.border = border; | border = aBorder; | public DefaultTextField(Border border) { this.border = border; } |
if (DefaultTreeCellEditor.this.tree.isEditing()) setLocation(offset, 0); super.doLayout(); | int eOffset; if (editingIcon != null) eOffset = TREE_ICON_GAP + editingIcon.getIconWidth() + ICON_TEXT_GAP; else eOffset = 0; Rectangle bounds = getBounds(); Component c = getComponent(0); c.setLocation(eOffset, 0); c.setSize(bounds.width - eOffset - TREE_ICON_GAP, bounds.height); | public void doLayout() { if (DefaultTreeCellEditor.this.tree.isEditing()) setLocation(offset, 0); super.doLayout(); } |
Rectangle tr = tree.getPathBounds(lastPath); if (tr != null) { Insets i = ((DefaultTextField) editingComponent).getBorder() .getBorderInsets(this); int textIconGap = 3; tr.x -= i.left; | public void paint(Graphics g) { Rectangle tr = tree.getPathBounds(lastPath); if (tr != null) { Insets i = ((DefaultTextField) editingComponent).getBorder() .getBorderInsets(this); int textIconGap = 3; tr.x -= i.left; ... | |
editingIcon.paintIcon(this, g, tr.x - editingIcon. getIconWidth()/2, tr.y + i.top + i.bottom); tr.x += editingIcon.getIconWidth()/2 + textIconGap; } tr.width += offset; g.translate(tr.x, tr.y); editingComponent.setSize(new Dimension(tr.width, tr.height)); editingComponent.paint(g); g.translate(-tr.x, -tr.y); | editingIcon.paintIcon(this, g, TREE_ICON_GAP, 0); | public void paint(Graphics g) { Rectangle tr = tree.getPathBounds(lastPath); if (tr != null) { Insets i = ((DefaultTextField) editingComponent).getBorder() .getBorderInsets(this); int textIconGap = 3; tr.x -= i.left; ... |
if (lastPath != null && tPath != null && tPath.equals(lastPath)) { tree.startEditingAtPath(lastPath); timer.stop(); } | public void actionPerformed(ActionEvent e) { if (lastPath != null && tPath != null && tPath.equals(lastPath)) { tree.startEditingAtPath(lastPath); timer.stop(); } } | |
timer.stop(); realEditor.cancelCellEditing(); | tree.cancelEditing(); editingComponent = null; | public void cancelCellEditing() { if (editingComponent != null) { timer.stop(); realEditor.cancelCellEditing(); } } |
stopEditingTimer(); | public void cancelCellEditing() { if (editingComponent != null) { timer.stop(); realEditor.cancelCellEditing(); } } | |
realEditor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( | DefaultCellEditor editor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( | protected TreeCellEditor createTreeCellEditor() { realEditor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( UIManager.getBorder("Tree.selectionBorder"))); return realEditor; } |
return realEditor; | editor.addCellEditorListener(new RealEditorListener()); editor.setClickCountToStart(CLICK_COUNT_TO_START); realEditor = editor; return editor; | protected TreeCellEditor createTreeCellEditor() { realEditor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( UIManager.getBorder("Tree.selectionBorder"))); return realEditor; } |
return editingComponent; | return realEditor.getCellEditorValue(); | public Object getCellEditorValue() { return editingComponent; } |
createTreeCellEditor(); | realEditor = createTreeCellEditor(); | public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) createTreeCellEditor(); return realEditor.getTreeCellEditor... |
if (shouldStartEditingTimer(event)) startEditingTimer(); else if (timer.isRunning()) timer.stop(); | public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } // Cell may not be currently... | |
editingContainer.removeAll(); | protected void prepareForEditing() { editingContainer.add(editingComponent); } | |
if (timer == null) timer = new javax.swing.Timer(1200, this); if (!timer.isRunning()) | if (timer != null) | protected void startEditingTimer() { if (timer == null) timer = new javax.swing.Timer(1200, this); if (!timer.isRunning()) timer.start(); } |
if (editingComponent != null && realEditor.stopCellEditing()) | if (editingComponent != null) | public boolean stopCellEditing() { if (editingComponent != null && realEditor.stopCellEditing()) { timer.stop(); return true; } return false; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.