rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public abstract String getAsText(); | String getAsText(); | public abstract String getAsText(); |
public abstract java.awt.Component getCustomEditor(); | java.awt.Component getCustomEditor(); | public abstract java.awt.Component getCustomEditor(); |
public abstract String getJavaInitializationString(); | String getJavaInitializationString(); | public abstract String getJavaInitializationString(); |
public abstract String[] getTags(); | String[] getTags(); | public abstract String[] getTags(); |
public abstract Object getValue(); | Object getValue(); | public abstract Object getValue(); |
public abstract boolean isPaintable(); | boolean isPaintable(); | public abstract boolean isPaintable(); |
public abstract void paintValue(java.awt.Graphics g, java.awt.Rectangle bounds); | void paintValue(java.awt.Graphics g, java.awt.Rectangle bounds); | public abstract void paintValue(java.awt.Graphics g, java.awt.Rectangle bounds); |
public abstract void removePropertyChangeListener(PropertyChangeListener listener); | void removePropertyChangeListener(PropertyChangeListener listener); | public abstract void removePropertyChangeListener(PropertyChangeListener listener); |
public abstract void setAsText(String text) throws IllegalArgumentException; | void setAsText(String text) throws IllegalArgumentException; | public abstract void setAsText(String text) throws IllegalArgumentException; |
public abstract void setValue(Object value); | void setValue(Object value); | public abstract void setValue(Object value); |
public abstract boolean supportsCustomEditor(); | boolean supportsCustomEditor(); | public abstract boolean supportsCustomEditor(); |
protected AssemblerModule(final Map labels) { | protected AssemblerModule(final Map labels, final Map constants) { | protected AssemblerModule(final Map labels) { this.labels = labels; } |
this.constants = constants; | protected AssemblerModule(final Map labels) { this.labels = labels; } | |
return new TextHitInfo(); | return new TextHitInfo (offset, true); | public static TextHitInfo afterOffset(int offset) { return new TextHitInfo(); } |
return new TextHitInfo(); | return new TextHitInfo (offset, false); | public static TextHitInfo beforeOffset(int offset) { return new TextHitInfo(); } |
return -1; | return charIndex; | public int getCharIndex() { return -1; } |
return -1; | return (leadingEdge ? charIndex : charIndex + 1); | public int getInsertionIndex() { return -1; } |
return new TextHitInfo(); | return new TextHitInfo (charIndex + offset, leadingEdge); | public TextHitInfo getOffsetHit(int offset) { return new TextHitInfo(); } |
return new TextHitInfo(); | return (leadingEdge ? trailing (charIndex - 1) : leading (charIndex + 1)); | public TextHitInfo getOtherHit() { return new TextHitInfo(); } |
return getCharIndex(); | return charIndex; | public int hashCode() { return getCharIndex(); } |
return false; | return leadingEdge; | public boolean isLeadingEdge() { return false; } |
return new TextHitInfo(); | return new TextHitInfo (charIndex, true); | public static TextHitInfo leading(int charIndex) { return new TextHitInfo(); } |
return ""; | return "TextHitInfo[" + charIndex + (leadingEdge ? "L" : "T" ) + "]"; | public String toString() { return ""; } |
return new TextHitInfo(); | return new TextHitInfo (charIndex, false); | public static TextHitInfo trailing(int charIndex) { return new TextHitInfo(); } |
if (replace) inputAttributes.removeAttributes(inputAttributes); | public void setCharacterAttributes(AttributeSet attribute, boolean replace) { int dot = getCaret().getDot(); int start = getSelectionStart(); int end = getSelectionEnd(); if (start == dot && end == dot) // There is no selection, update insertAttributes instead ... | |
EditorKit getEditorKit() { return kit; } | public EditorKit getEditorKit() { return kit; } | EditorKit getEditorKit() { return kit; } |
void insertString(int offset, String str, AttributeSet a); | void insertString(int offset, String str, AttributeSet a) throws BadLocationException; | void insertString(int offset, String str, AttributeSet a); |
void replaceSelection(String content) | public void replaceSelection(String content) | void replaceSelection(String content) { //Replaces the currently selected content with new content represented by the given string. } |
void setEditorKit(EditorKit kit) | public void setEditorKit(EditorKit kit) | void setEditorKit(EditorKit kit) { this.kit = kit; invalidate(); repaint(); } |
return dropAction & targetActions & ((DragSourceContext) source).getSourceActions(); | return (dropAction & targetActions & ((DragSourceContext) source).getSourceActions()); | public int getDropAction() { return dropAction & targetActions & ((DragSourceContext) source).getSourceActions(); } |
public StandardVGAIO(ResourceOwner owner, MemoryResource mem) throws ResourceNotFreeException { | public StandardVGAIO(ResourceOwner owner, MemoryResource mem) throws ResourceNotFreeException, DriverException { | public StandardVGAIO(ResourceOwner owner, MemoryResource mem) throws ResourceNotFreeException { try { ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); vgaIO = rm.claimIOResource(owner, VGA_FIRST_PORT, VGA_LAST_PORT - VGA_FIRST_PORT + 1); this.mem = mem; current_mode = getColo... |
vgaIO = rm.claimIOResource(owner, VGA_FIRST_PORT, VGA_LAST_PORT - VGA_FIRST_PORT + 1); | vgaIO = claimPorts(rm, owner, VGA_FIRST_PORT, VGA_LAST_PORT - VGA_FIRST_PORT + 1); | public StandardVGAIO(ResourceOwner owner, MemoryResource mem) throws ResourceNotFreeException { try { ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); vgaIO = rm.claimIOResource(owner, VGA_FIRST_PORT, VGA_LAST_PORT - VGA_FIRST_PORT + 1); this.mem = mem; current_mode = getColo... |
public final void drawImage(Raster src, int srcX, int srcY, int dstX, int dstY, int w, int h, int bgColor) { if ((dstY < this.height) && (dstX < this.width)) { if (dstX < 0) { srcX -= dstX; w += dstX; dstX = 0; } if (dstY < 0) { srcY -= dstY; h += dstY; dstY = 0; } w = Math.min(w, width - dstX); h = Math.min(h, height ... | public final void drawImage(Raster src, int srcX, int srcY, int dstX, int dstY, int w, int h) { if ((dstY < this.height) && (dstX < this.width)) { if (dstX < 0) { srcX -= dstX; w += dstX; dstX = 0; } if (dstY < 0) { srcY -= dstY; h += dstY; dstY = 0; } w = Math.min(w, width - dstX); h = Math.min(h, height - dstY); if (... | public final void drawImage(Raster src, int srcX, int srcY, int dstX, int dstY, int w, int h, int bgColor) { if ((dstY < this.height) && (dstX < this.width)) { if (dstX < 0) { srcX -= dstX; w += dstX; dstX = 0; } if (dstY < 0) { srcY -= dstY; h += dstY; dstY = 0; } w = Math.min(w, width - ... |
Rectangle r = a.getBounds(); childAllocation(childIndex, r); Shape result = child.modelToView(pos, r, bias); if (result == null) throw new AssertionError("" + child.getClass().getName() + ".modelToView() must not return null"); return result; | Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc == null) ret = createDefaultLocation(a, bias); Shape result = child.modelToView(pos, childAlloc, bias); if (result != null) ret = result; else ret = createDefaultLocation(a, bias); | public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); if (childIndex != -1) { View child = getView(childIndex); Rectangle r = a.getBounds(); childAllocation(childIndex, r); Shape result = child.... |
throw new BadLocationException("No child view for the specified location", pos); | ret = createDefaultLocation(a, bias); return ret; | public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); if (childIndex != -1) { View child = getView(childIndex); Rectangle r = a.getBounds(); childAllocation(childIndex, r); Shape result = child.... |
if (parent == null) { int numChildren = getViewCount(); for (int i = 0; i < numChildren; i++) getView(i).setParent(this); } | public void setParent(View parent) { this.parent = parent; } | |
return getType(ch) == DECIMAL_DIGIT_NUMBER; | return isDigit((int)ch); | public static boolean isDigit(char ch) { return getType(ch) == DECIMAL_DIGIT_NUMBER; } |
Class cls = Class.forName(clsname); | final ClassLoader cl = Thread.currentThread().getContextClassLoader(); final Class cls = cl.loadClass(clsname); | private static synchronized URLStreamHandler getURLStreamHandler(String protocol) { URLStreamHandler ph; // First, see if a protocol handler is in our cache if (cache_handlers) { Class cls = (Class)ph_cache.get(protocol); if (cls != null) { try { ph = (URLStreamHandler)cls.newInstance(); return (ph);... |
if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); | SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkListen(impl.getLocalPort()); | public Socket accept () throws IOException { if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkListen (impl.getLocalPort ()); Socket s = new Socket(); implAccept (s); return s; } |
SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkListen (impl.getLocalPort ()); | Socket socket = new Socket(); | public Socket accept () throws IOException { if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkListen (impl.getLocalPort ()); Socket s = new Socket(); implAccept (s); return s; } |
Socket s = new Socket(); implAccept (s); | try { implAccept(socket); } catch (IOException e) { try { socket.close(); } catch (IOException e2) { } | public Socket accept () throws IOException { if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkListen (impl.getLocalPort ()); Socket s = new Socket(); implAccept (s); return s; } |
return s; | throw e; } return socket; | public Socket accept () throws IOException { if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); SecurityManager sm = System.getSecurityManager (); if (sm != null) sm.checkListen (impl.getLocalPort ()); Socket s = new Socket(); implAccept (s); return s; } |
if (impl != null) impl.close (); | if (isClosed()) return; | public void close () throws IOException { if (impl != null) impl.close (); if (ch != null) ch.close (); closed = true; } |
if (ch != null) ch.close (); | impl.close(); impl = null; bound = false; | public void close () throws IOException { if (impl != null) impl.close (); if (ch != null) ch.close (); closed = true; } |
closed = true; | if (getChannel() != null) getChannel().close(); | public void close () throws IOException { if (impl != null) impl.close (); if (ch != null) ch.close (); closed = true; } |
return ch; | return null; | public ServerSocketChannel getChannel() { return ch; } |
if (! isBound()) return -1; | public int getLocalPort() { return impl.getLocalPort(); } | |
InetAddress addr = getInetAddress(); | if (! isBound()) return null; | public SocketAddress getLocalSocketAddress() { InetAddress addr = getInetAddress(); if (addr != null) return new InetSocketAddress (getInetAddress(), getLocalPort()); return null; } |
if (addr != null) return new InetSocketAddress (getInetAddress(), getLocalPort()); return null; | return new InetSocketAddress(getInetAddress(), getLocalPort()); | public SocketAddress getLocalSocketAddress() { InetAddress addr = getInetAddress(); if (addr != null) return new InetSocketAddress (getInetAddress(), getLocalPort()); return null; } |
if (impl == null) throw new SocketException ("Not connected"); | if (isClosed()) throw new SocketException("ServerSocket is closed"); | public int getReceiveBufferSize () throws SocketException { if (impl == null) throw new SocketException ("Not connected"); Object buf = impl.getOption (SocketOptions.SO_RCVBUF); if (!(buf instanceof Integer)) throw new SocketException ("Internal Error: Unexpected type"); return ((Integer... |
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); | if (isClosed()) throw new SocketException("ServerSocket is closed"); | public boolean getReuseAddress() throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); Object reuseaddr = impl.getOption (SocketOptions.SO_REUSEADDR); if (!(reuseaddr instanceof Boolean)) throw new SocketException ("Internal Error"); ... |
protected final void implAccept (Socket s) throws IOException | protected final void implAccept(Socket socket) throws IOException | protected final void implAccept (Socket s) throws IOException { if (ch != null && !ch.isBlocking()) throw new IllegalBlockingModeException(); impl.accept(s.impl); } |
if (ch != null && !ch.isBlocking()) | if (isClosed()) throw new SocketException("ServerSocket is closed"); if (getChannel() != null && ! getChannel().isBlocking() && ! ((PlainSocketImpl) getImpl()).isInChannelOperation()) | protected final void implAccept (Socket s) throws IOException { if (ch != null && !ch.isBlocking()) throw new IllegalBlockingModeException(); impl.accept(s.impl); } |
impl.accept(s.impl); | impl.accept(socket.impl); socket.implCreated = true; | protected final void implAccept (Socket s) throws IOException { if (ch != null && !ch.isBlocking()) throw new IllegalBlockingModeException(); impl.accept(s.impl); } |
try { Object bindaddr = impl.getOption (SocketOptions.SO_BINDADDR); } catch (SocketException e) { return false; } return true; | return bound; | public boolean isBound() { try { Object bindaddr = impl.getOption (SocketOptions.SO_BINDADDR); } catch (SocketException e) { return false; } return true; } |
return closed; | return impl == null; | public boolean isClosed() { return closed; } |
if (impl == null) throw new SocketException ("Not connected"); | if (isClosed()) throw new SocketException("ServerSocket is closed"); | public void setReceiveBufferSize (int size) throws SocketException { if (impl == null) throw new SocketException ("Not connected"); if (size <= 0) throw new IllegalArgumentException ("SO_RCVBUF value must be > 0"); impl.setOption (SocketOptions.SO_RCVBUF, new Integer (size)); } |
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); | if (isClosed()) throw new SocketException("ServerSocket is closed"); | public void setReuseAddress (boolean on) throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } |
impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); | impl.setOption(SocketOptions.SO_REUSEADDR, Boolean.valueOf(on)); | public void setReuseAddress (boolean on) throws SocketException { if (impl == null) throw new SocketException ("Cannot initialize Socket implementation"); impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); } |
if (isClosed()) throw new SocketException("ServerSocket is closed"); | public void setSoTimeout (int timeout) throws SocketException { if (timeout < 0) throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0"); impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout)); } | |
return "ServerSocket" + impl.toString(); | if (! isBound()) return "ServerSocket[unbound]"; return ("ServerSocket[addr=" + getInetAddress() + ",port=" + impl.getPort() + ",localport=" + impl.getLocalPort() + "]"); | public String toString () { return "ServerSocket" + impl.toString(); } |
return "[addr=" + address + ",port=" + port + ",localport=" + localport + "]"; | return "[addr=" + ((address == null) ? "0.0.0.0/0.0.0.0" : address.toString()) + ",port=" + port + ",localport=" + localport + "]"; | public String toString() { return "[addr=" + address + ",port=" + port + ",localport=" + localport + "]"; } |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return Fidelity.class; } |
public final String getName() | public String getName() | public final String getName() { return "fidelity"; } |
public UndoManager() { } | public UndoManager() { limit = 100; } | public UndoManager() { // TODO } // UndoManager() |
public synchronized boolean addEdit(UndoableEdit value0) { return false; } | public synchronized boolean addEdit(UndoableEdit edit) { boolean result; trimEdits(indexOfNextAdd, edits.size() - 1); result = super.addEdit(edit); indexOfNextAdd = edits.size(); trimForLimit(); return result; } | public synchronized boolean addEdit(UndoableEdit value0) { return false; // TODO } // addEdit() |
public synchronized boolean canRedo() { return false; } | public synchronized boolean canRedo() { UndoableEdit edit; if (!isInProgress()) return super.canRedo(); edit = editToBeRedone(); return edit != null && edit.canRedo(); } | public synchronized boolean canRedo() { return false; // TODO } // canRedo() |
public synchronized boolean canUndo() { return false; } | public synchronized boolean canUndo() { UndoableEdit edit; if (!isInProgress()) return super.canUndo(); edit = editToBeUndone(); return edit != null && edit.canUndo(); } | public synchronized boolean canUndo() { return false; // TODO } // canUndo() |
public synchronized boolean canUndoOrRedo() { return false; } | public synchronized boolean canUndoOrRedo() { return indexOfNextAdd == edits.size() ? canUndo() : canRedo(); } | public synchronized boolean canUndoOrRedo() { return false; // TODO } // canUndoOrRedo() |
public synchronized void discardAllEdits() { } | public synchronized void discardAllEdits() { int size; size = edits.size(); for (int i = size - 1; i >= 0; i--) ((UndoableEdit) edits.get(i)).die(); indexOfNextAdd = 0; edits.clear(); } | public synchronized void discardAllEdits() { // TODO } // discardAllEdits() |
protected UndoableEdit editToBeRedone() { return null; } | protected UndoableEdit editToBeRedone() { UndoableEdit result; for (int i = indexOfNextAdd; i < edits.size(); i++) { result = (UndoableEdit) edits.get(i); if (result.isSignificant()) return result; } return null; } | protected UndoableEdit editToBeRedone() { return null; // TODO } // editToBeRedone() |
protected UndoableEdit editToBeUndone() { return null; } | protected UndoableEdit editToBeUndone() { UndoableEdit result; for (int i = indexOfNextAdd - 1; i >= 0; i--) { result = (UndoableEdit) edits.get(i); if (result.isSignificant()) return result; } return null; } | protected UndoableEdit editToBeUndone() { return null; // TODO } // editToBeUndone() |
public synchronized void end() { } | public synchronized void end() { super.end(); trimEdits(indexOfNextAdd, edits.size() - 1); } | public synchronized void end() { // TODO } // end() |
public synchronized int getLimit() { return 0; } | public synchronized int getLimit() { return limit; } | public synchronized int getLimit() { return 0; // TODO } // getLimit() |
public synchronized String getRedoPresentationName() { return null; } | public synchronized String getRedoPresentationName() { UndoableEdit edit; if (!isInProgress()) return super.getRedoPresentationName(); edit = editToBeRedone(); if (edit == null) return UIManager.getString("AbstractUndoableEdit.redoText"); else return edit.getRedoPresentationName(); } | public synchronized String getRedoPresentationName() { return null; // TODO } // getRedoPresentationName() |
public synchronized String getUndoOrRedoPresentationName() { return null; } | public synchronized String getUndoOrRedoPresentationName() { if (indexOfNextAdd == edits.size()) return getUndoPresentationName(); else return getRedoPresentationName(); } | public synchronized String getUndoOrRedoPresentationName() { return null; // TODO } // getUndoOrRedoPresentationName() |
public synchronized String getUndoPresentationName() { return null; } | public synchronized String getUndoPresentationName() { UndoableEdit edit; if (!isInProgress()) return super.getUndoPresentationName(); edit = editToBeUndone(); if (edit == null) return UIManager.getString("AbstractUndoableEdit.undoText"); else return edit.getUndoPresentationName(); } | public synchronized String getUndoPresentationName() { return null; // TODO } // getUndoPresentationName() |
public synchronized void redo() throws CannotRedoException { } | public synchronized void redo() throws CannotRedoException { if (!isInProgress()) { super.redo(); return; } UndoableEdit edit = editToBeRedone(); if (edit == null) throw new CannotRedoException(); redoTo(edit); } | public synchronized void redo() throws CannotRedoException { // TODO } // redo() |
protected void redoTo(UndoableEdit value0) throws CannotRedoException { } | protected void redoTo(UndoableEdit edit) throws CannotRedoException { UndoableEdit cur; if (!edits.contains(edit)) throw new CannotRedoException(); while (true) { cur = (UndoableEdit) edits.get(indexOfNextAdd); indexOfNextAdd += 1; cur.redo(); if (cur == edit) return; } } | protected void redoTo(UndoableEdit value0) throws CannotRedoException { // TODO } // redoTo() |
public synchronized void setLimit(int value0) { } | public synchronized void setLimit(int limit) { if (!isInProgress()) throw new IllegalStateException(); this.limit = limit; trimForLimit(); } | public synchronized void setLimit(int value0) { // TODO } // setLimit() |
public String toString() { return null; } | public String toString() { return super.toString() + " limit: " + limit + " indexOfNextAdd: " + indexOfNextAdd; } | public String toString() { return null; // TODO } // toString() |
protected void trimEdits(int value0, int value1) { } | protected void trimEdits(int from, int to) { if (from > to) return; for (int i = to; i >= from; i--) ((UndoableEdit) edits.get(i)).die(); if (to == from) edits.remove(from); else edits.subList(from, to + 1).clear(); if (indexOfNextAdd > to) indexOfNextAdd = indexOfNextAdd - to + from - 1; else if (indexOfNextAdd ... | protected void trimEdits(int value0, int value1) { // TODO } // trimEdits() |
protected void trimForLimit() { } | protected void trimForLimit() { int high, s; s = edits.size(); if (limit <= 0 || s <= limit) return; high = Math.min(indexOfNextAdd + limit/2 - 1, s - 1); trimEdits(high + 1, s - 1); trimEdits(0, high - limit); } | protected void trimForLimit() { // TODO } // trimForLimit() |
public synchronized void undo() throws CannotUndoException { } | public synchronized void undo() throws CannotUndoException { if (!isInProgress()) { super.undo(); return; } UndoableEdit edit = editToBeUndone(); if (edit == null) throw new CannotUndoException(); undoTo(edit); } | public synchronized void undo() throws CannotUndoException { // TODO } // undo() |
public synchronized void undoOrRedo() throws CannotRedoException, CannotUndoException { } | public synchronized void undoOrRedo() throws CannotRedoException, CannotUndoException { if (indexOfNextAdd == edits.size()) undo(); else redo(); } | public synchronized void undoOrRedo() throws CannotRedoException, CannotUndoException { // TODO } // undoOrRedo() |
protected void undoTo(UndoableEdit value0) throws CannotUndoException { } | protected void undoTo(UndoableEdit edit) throws CannotUndoException { UndoableEdit cur; if (!edits.contains(edit)) throw new CannotUndoException(); while (true) { indexOfNextAdd -= 1; cur = (UndoableEdit) edits.get(indexOfNextAdd); cur.undo(); if (cur == edit) return; } } | protected void undoTo(UndoableEdit value0) throws CannotUndoException { // TODO } // undoTo() |
public void undoableEditHappened(UndoableEditEvent value0) { } | public void undoableEditHappened(UndoableEditEvent event) { addEdit(event.getEdit()); } | public void undoableEditHappened(UndoableEditEvent value0) { // TODO } // undoableEditHappened() |
public boolean addEdit(UndoableEdit anEdit) { | public boolean addEdit(UndoableEdit edit) { UndoableEdit last; | public boolean addEdit(UndoableEdit anEdit) { // Variables UndoableEdit lastEdit; if (inProgress == true) { // Get Last Edit lastEdit = lastEdit(); // Check for null if (lastEdit != null) { if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); ... |
UndoableEdit lastEdit; | if (!inProgress) return false; | public boolean addEdit(UndoableEdit anEdit) { // Variables UndoableEdit lastEdit; if (inProgress == true) { // Get Last Edit lastEdit = lastEdit(); // Check for null if (lastEdit != null) { if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); ... |
if (inProgress == true) { | last = lastEdit(); | public boolean addEdit(UndoableEdit anEdit) { // Variables UndoableEdit lastEdit; if (inProgress == true) { // Get Last Edit lastEdit = lastEdit(); // Check for null if (lastEdit != null) { if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); ... |
lastEdit = lastEdit(); | if (last == null) { edits.add(edit); return true; } | public boolean addEdit(UndoableEdit anEdit) { // Variables UndoableEdit lastEdit; if (inProgress == true) { // Get Last Edit lastEdit = lastEdit(); // Check for null if (lastEdit != null) { if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); ... |
if (lastEdit != null) { | if (last.addEdit(edit)) return true; | public boolean addEdit(UndoableEdit anEdit) { // Variables UndoableEdit lastEdit; if (inProgress == true) { // Get Last Edit lastEdit = lastEdit(); // Check for null if (lastEdit != null) { if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); ... |
if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); } } | if (edit.replaceEdit(last)) { edits.set(edits.size() - 1, edit); return true; } | public boolean addEdit(UndoableEdit anEdit) { // Variables UndoableEdit lastEdit; if (inProgress == true) { // Get Last Edit lastEdit = lastEdit(); // Check for null if (lastEdit != null) { if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); ... |
} return true; } else { return false; } } | edits.add(edit); return true; } | public boolean addEdit(UndoableEdit anEdit) { // Variables UndoableEdit lastEdit; if (inProgress == true) { // Get Last Edit lastEdit = lastEdit(); // Check for null if (lastEdit != null) { if (lastEdit.addEdit(anEdit) == false) { if (lastEdit.replaceEdit(anEdit) == false) { edits.add(anEdit); ... |
public boolean canRedo() { if (isInProgress() == true || super.canRedo() == false) { return false; } return true; } | public boolean canRedo() { return !inProgress && super.canRedo(); } | public boolean canRedo() { if (isInProgress() == true || super.canRedo() == false) { return false; } return true; } // canRedo() |
public boolean canUndo() { if (isInProgress() == true || super.canUndo() == false) { return false; } return true; } | public boolean canUndo() { return !inProgress && super.canUndo(); } | public boolean canUndo() { if (isInProgress() == true || super.canUndo() == false) { return false; } return true; } // canUndo() |
public String getRedoPresentationName() { if (edits.size() == 0) { return super.getRedoPresentationName(); } else { return lastEdit().getRedoPresentationName(); } } | public String getRedoPresentationName() { UndoableEdit last; last = lastEdit(); if (last == null) return super.getRedoPresentationName(); else return last.getRedoPresentationName(); } | public String getRedoPresentationName() { if (edits.size() == 0) { return super.getRedoPresentationName(); } else { return lastEdit().getRedoPresentationName(); } } // getRedoPresentationName() |
public String getUndoPresentationName() { if (edits.size() == 0) { return super.getUndoPresentationName(); } else { return lastEdit().getUndoPresentationName(); } } | public String getUndoPresentationName() { UndoableEdit last; last = lastEdit(); if (last == null) return super.getUndoPresentationName(); else return last.getUndoPresentationName(); } | public String getUndoPresentationName() { if (edits.size() == 0) { return super.getUndoPresentationName(); } else { return lastEdit().getUndoPresentationName(); } } // getUndoPresentationName() |
public void redo() throws CannotRedoException { | public void redo() throws CannotRedoException { super.redo(); | public void redo() throws CannotRedoException { // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); current.redo(); } // for: index } // redo() |
int index; UndoableEdit current; for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); current.redo(); } } | for (int i = 0; i < edits.size(); i++) ((UndoableEdit) edits.elementAt(i)).redo(); } | public void redo() throws CannotRedoException { // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); current.redo(); } // for: index } // redo() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.