bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public boolean handlesWheelScrolling() { return false; }
public boolean handlesWheelScrolling() { return false; }
10,843
public boolean isObscured() { return false; }
public boolean isObscured() { return false; }
10,844
public boolean requestFocus(Component lightweightChild, boolean temporary, boolean focusedWindowChangeAllowed, long time) { return true; }
public boolean requestFocus(Component lightweightChild, boolean temporary, boolean focusedWindowChangeAllowed, long time) { return true; }
10,845
public void setEventMask(long mask) { // TODO Auto-generated method stub }
public void setEventMask(long mask) { // TODO Auto-generated method stub }
10,846
public void setEventMask(long mask) { // TODO Auto-generated method stub }
public void setEventMask(long mask) { // TODO Auto-generated method stub }
10,847
public void updateCursorImmediately() { }
public void updateCursorImmediately() { }
10,848
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) { // Menu item is considered to be highlighted when it is selected. // But we don't want to paint the background of JCheckBoxMenuItems ButtonModel mod = menuItem.getModel(); if ((menuItem.isSelected() && checkIcon == null) || (...
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) { // Menu item is considered to be highlighted when it is selected. // But we don't want to paint the background of JCheckBoxMenuItems ButtonModel mod = menuItem.getModel(); if ((menuItem.isSelected() && checkIcon == null) || (...
10,849
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) { // Menu item is considered to be highlighted when it is selected. // But we don't want to paint the background of JCheckBoxMenuItems ButtonModel mod = menuItem.getModel(); if ((menuItem.isSelected() && checkIcon == null) || (...
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) { // Menu item is considered to be highlighted when it is selected. // But we don't want to paint the background of JCheckBoxMenuItems ButtonModel mod = menuItem.getModel(); if ((menuItem.isSelected() && checkIcon == null) || (...
10,850
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new R...
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new R...
10,851
public void actionPerformed(ActionEvent event) { JEditorPane editor = getEditor(event); StyledDocument doc = getStyledDocument(editor); Element el = doc.getCharacterElement(editor.getSelectionStart()); boolean isBold = StyleConstants.isBold(el.getAttributes()); SimpleAttributeSet atts = ...
public void actionPerformed(ActionEvent event) { JEditorPane editor = getEditor(event); StyledDocument doc = getStyledDocument(editor); Element el = doc.getCharacterElement(editor.getSelectionStart()); boolean isBold = StyleConstants.isBold(el.getAttributes()); SimpleAttributeSet atts = ...
10,852
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
10,853
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
10,854
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
10,855
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
protected final void setCharacterAttributes(JEditorPane editor, AttributeSet atts, boolean replace) { Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (Styl...
10,856
boolean addEdit(UndoableEdit anEdit);
boolean addEdit(UndoableEdit anEdit);
10,858
boolean replaceEdit(UndoableEdit anEdit);
boolean replaceEdit(UndoableEdit anEdit);
10,859
public int getIndexOfChild(Object parent, Object child) { return 0; // TODO }
public int getIndexOfChild(Object parent, Object child) { for (int i = 0; i < getChildCount(parent); i++) { if (getChild(parent, i).equals(child)) return i; } return -1; // TODO }
10,860
public Component componentForPoint(Component source, Point sourcePoint) { // Convert sourcePoint to screen coordinates. Point sourcePointOnScreen = sourcePoint; SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); Point compPointOnScreen; Component resultComp = null; // For each menu e...
public Component componentForPoint(Component source, Point sourcePoint) { // Convert sourcePoint to screen coordinates. Point sourcePointOnScreen = sourcePoint; if (source.isShowing()) SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); Point compPointOnScreen; Component resultComp = nu...
10,861
public Component componentForPoint(Component source, Point sourcePoint) { // Convert sourcePoint to screen coordinates. Point sourcePointOnScreen = sourcePoint; SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); Point compPointOnScreen; Component resultComp = null; // For each menu e...
public Component componentForPoint(Component source, Point sourcePoint) { // Convert sourcePoint to screen coordinates. Point sourcePointOnScreen = sourcePoint; SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); Point compPointOnScreen; Component resultComp = null; // For each menu e...
10,862
public Component componentForPoint(Component source, Point sourcePoint) { // Convert sourcePoint to screen coordinates. Point sourcePointOnScreen = sourcePoint; SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); Point compPointOnScreen; Component resultComp = null; // For each menu e...
public Component componentForPoint(Component source, Point sourcePoint) { // Convert sourcePoint to screen coordinates. Point sourcePointOnScreen = sourcePoint; SwingUtilities.convertPointToScreen(sourcePointOnScreen, source); Point compPointOnScreen; Component resultComp = null; // For each menu e...
10,863
private MenuElement[] getPath(Component c) { // FIXME: There is the same method in BasicMenuItemUI. However I // cannot use it here instead of this method, since I cannot assume that // all the menu elements on the selected path are JMenuItem or JMenu. // For now I've just duplicated it here. Please ...
private MenuElement[] getPath(Component c) { // FIXME: There is the same method in BasicMenuItemUI. However I // cannot use it here instead of this method, since I cannot assume that // all the menu elements on the selected path are JMenuItem or JMenu. // For now I've just duplicated it here. Please ...
10,864
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
10,865
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
10,866
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
10,867
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
public final void setAttribute(int i) { colSep = false; underLine = false; nonDisplay = false; isChanged = attr == i ? false : true; attr = i; if(i == 0) return; switch(i) { case 32: // green normal fg = s.colorGreen; bg = s.colorBg; ...
10,868
public ThreadLocal() { }
public ThreadLocal() { }
10,869
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL ...
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL ...
10,870
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL ...
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL ...
10,871
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL ...
public Object get() { Thread currentThread = Thread.currentThread(); // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. Object value = valueMap.get(currentThread); if (value == null) { value = initialValue(); valueMap.put(currentThread, value == null ? NULL ...
10,872
protected Object initialValue() { return null; }
protected Object initialValue() { return null; }
10,873
public void set(Object value) { // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. valueMap.put(Thread.currentThread(), value == null ? NULL : value); }
public void set(Object value) { // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. valueMap.put(Thread.currentThread(), value == null ? NULL : value); }
10,874
public void set(Object value) { // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. valueMap.put(Thread.currentThread(), value == null ? NULL : value); }
public void set(Object value) { // Note that we don't have to synchronize, as only this thread will // ever modify the returned value. valueMap.put(Thread.currentThread(), value == null ? NULL : value); }
10,875
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
10,876
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
10,877
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
10,878
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
10,879
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
final public void render(Surface surface, Shape clip, AffineTransform tx, String str, int x, int y, Color color) { if (str == null || str.length() == 0) { System.err.println("empty string!"); return; } BDFMetrics fm = (BDFMetrics)bdfFont.getFontMetric...
10,880
protected static BufferedImage getDestination (ImageReadParam param, Iterator imageTypes, int width, int height) throws IIOException { if (imageTypes == null || !imageTypes.hasNext()) throw new IllegalArgumentException ("imageTypes null or empty"); if (width < 0 || height < 0) th...
protected static BufferedImage getDestination (ImageReadParam param, Iterator imageTypes, int width, int height) throws IIOException { if (imageTypes == null || !imageTypes.hasNext()) throw new IllegalArgumentException ("imageTypes null or empty"); if (width < 0 || height < 0) th...
10,881
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException { //synchronize to the inode cache to make sure that the inode does not // get //flushed between reading it and locking it synchronized (((Ext2FileSystem) getFileSystem()).getInodeC...
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException { //synchronize to the inode cache to make sure that the inode does not // get //flushed between reading it and locking it synchronized (((Ext2FileSystem) getFileSystem()).getInodeC...
10,884
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException { //synchronize to the inode cache to make sure that the inode does not // get //flushed between reading it and locking it synchronized (((Ext2FileSystem) getFileSystem()).getInodeC...
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException { //synchronize to the inode cache to make sure that the inode does not // get //flushed between reading it and locking it synchronized (((Ext2FileSystem) getFileSystem()).getInodeC...
10,885
public OutputStream _invoke(String method, InputStream in, ResponseHandler rh) { OutputStream out = null; Integer call_method = (Integer) methods.get(method); if (call_method == null) throw new BAD_OPERATION(0, CompletionStatus.COMPLETED_MAYBE); switch (call_method.intValue()) { case 0 :...
public OutputStream _invoke(String method, InputStream in, ResponseHandler rh) { OutputStream out = null; Integer call_method = (Integer) methods.get(method); if (call_method == null) throw new BAD_OPERATION(Minor.Method, CompletionStatus.COMPLETED_MAYBE); switch (call_method.intValue()) { ...
10,887
public void invoke(ServerRequest request) { Streamable result = null; // The server request contains no required result type. Integer call_method = (Integer) methods.get(request.operation()); if (call_method == null) throw new BAD_OPERATION(0, CompletionStatus.COMPLETED_MAYBE); switch (call_metho...
public void invoke(ServerRequest request) { Streamable result = null; // The server request contains no required result type. Integer call_method = (Integer) methods.get(request.operation()); if (call_method == null) throw new BAD_OPERATION(Minor.Method, CompletionStatus.COMPLETED_MAYBE); switch ...
10,888
public static HostnameVerifier getDefaultHostnameVerifier() { return defaultVerifier; }
public static synchronized HostnameVerifier getDefaultHostnameVerifier() { return defaultVerifier; }
10,889
public static SSLSocketFactory getDefaultSSLSocketFactory() { return defaultFactory; }
public static synchronized SSLSocketFactory getDefaultSSLSocketFactory() { return defaultFactory; }
10,891
protected abstract void resolve() throws PluginException;
protected abstract void resolve() throws PluginException;
10,895
protected abstract void unresolve() throws PluginException;
protected abstract void unresolve() throws PluginException;
10,896
public SendEMailDialog(Frame parent, Session session) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog( parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE, null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] m...
public SendEMailDialog(Frame parent, Session session) { if (!isEMailAvailable()) { JOptionPane.showMessageDialog( parent, LangTool.getString("messages.noEmailAPI"), "Error", JOptionPane.ERROR_MESSAGE, null); } else { this.session = session; Screen5250 screen = session.getScreen(); Object[] m...
10,897
void hideTip() { if (currentTip == null || ! currentTip.isVisible() || ! enabled) return; currentTip.setVisible(false); if (containerPanel != null) { Container parent = containerPanel.getParent(); if (parent == null) return; parent.remove(containerPanel); parent = currentTip.getParent(); if (par...
voidhideTip(){if(currentTip==null||!currentTip.isVisible()||!enabled)return;currentTip.setVisible(false);if(containerPanel!=null){ Containerparent=containerPanel.getParent(); if(parent==null) return; parent.remove(containerPanel); parent=currentTip.getParent(); if(parent==null) return; parent.remove(currentTip); contai...
10,898
void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon...
void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon...
10,900
public MetalButtonUI() { super(); focusColor = UIManager.getColor(getPropertyPrefix() + "focus"); selectColor = UIManager.getColor(getPropertyPrefix() + "select"); disabledTextColor = UIManager.getColor(getPropertyPrefix() + "disabledText"); }
public MetalButtonUI() { super(); focusColor = UIManager.getColor(getPropertyPrefix() + "focus"); selectColor = UIManager.getColor(getPropertyPrefix() + "select"); disabledTextColor = UIManager.getColor(getPropertyPrefix() + "disabledText"); }
10,901
public static ComponentUI createUI(JComponent c) { return new MetalButtonUI(); }
public static ComponentUI createUI(JComponent c) { if (sharedUI == null) sharedUI = new MetalButtonUI(); return sharedUI; }
10,902
public void installDefaults(AbstractButton button) { super.installDefaults(button); button.setRolloverEnabled(UIManager.getBoolean( getPropertyPrefix() + "rollover")); }
public void installDefaults(AbstractButton button) { super.installDefaults(button); button.setRolloverEnabled(UIManager.getBoolean( getPropertyPrefix() + "rollover")); }
10,906
protected void paintButtonPressed(Graphics g, AbstractButton b) { if (b.isContentAreaFilled()) { Rectangle area = b.getVisibleRect(); g.setColor(selectColor); g.fillRect(area.x, area.y, area.width, area.height); } }
protected void paintButtonPressed(Graphics g, AbstractButton b) { if (b.isContentAreaFilled()) { Rectangle area = b.getVisibleRect(); g.setColor(getSelectColor()); g.fillRect(area.x, area.y, area.width, area.height); } }
10,907
public void uninstallDefaults(AbstractButton button) { super.uninstallDefaults(button); button.setRolloverEnabled(false); }
public void uninstallDefaults(AbstractButton button) { super.uninstallDefaults(button); }
10,908
public TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) { super(source); this.paths = paths; this.areNew = areNew; this.oldLeadSelectionPath = oldLeadSelectionPath; this.newLeadSelectionPath = newLeadSelectionPath...
public TreeSelectionEvent(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath) { super(source); this.paths = paths; this.areNew = areNew; this.oldLeadSelectionPath = oldLeadSelectionPath; this.newLeadSelectionPath = newLeadSelectionPath...
10,909
public TreePath getPath() { return paths[0]; } // getPath()
public TreePath getPath() { return paths[0]; } // getPath()
10,910
public boolean isAddedPath() { return areNew[0]; } // isAddedPath()
public boolean isAddedPath() { return areNew[0]; } // isAddedPath()
10,911
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font...
public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font...
10,912
public void addSelectionInterval(int index0, int index1) { if (selectionMode == SINGLE_SELECTION || selectionMode == SINGLE_INTERVAL_SELECTION) sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); ...
public void addSelectionInterval(int index0, int index1) { if (selectionMode == SINGLE_SELECTION || selectionMode == SINGLE_INTERVAL_SELECTION) sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); ...
10,913
public void addSelectionInterval(int index0, int index1) { if (selectionMode == SINGLE_SELECTION || selectionMode == SINGLE_INTERVAL_SELECTION) sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); ...
public void addSelectionInterval(int index0, int index1) { if (selectionMode == SINGLE_SELECTION || selectionMode == SINGLE_INTERVAL_SELECTION) sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); ...
10,914
public void addSelectionInterval(int index0, int index1) { if (selectionMode == SINGLE_SELECTION || selectionMode == SINGLE_INTERVAL_SELECTION) sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); ...
public void addSelectionInterval(int index0, int index1) { if (selectionMode == SINGLE_SELECTION || selectionMode == SINGLE_INTERVAL_SELECTION) sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); ...
10,915
public void setSelectionInterval(int index0, int index1) { sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); fireValueChanged(lo, hi, valueIsAdjusting); // update the anchorSelectionI...
public void setSelectionInterval(int index0, int index1) { sel.clear(); if (selectionMode == SINGLE_SELECTION) index0 = index1; int lo = Math.min(index0, index1); int hi = Math.max(index0, index1); sel.set(lo, hi+1); // update the anchorSelectionIndex and leadSelectionIndex variables set...
10,920
public void checkAccess(Thread thread) { if (thread.getThreadGroup() != null && thread.getThreadGroup().getParent() != null) checkPermission(new RuntimePermission("modifyThread")); }
public void checkAccess(Thread thread) { if (thread.getThreadGroup() != null && thread.getThreadGroup().getParent() == null) checkPermission(new RuntimePermission("modifyThread")); }
10,922
public GnuCrypto() { super(Registry.GNU_CRYPTO, 2.1, "GNU Crypto JCE Provider"); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { // Cipher put("Cipher.ANUBIS", gnu.javax.crypto.jce.cipher.AnubisSpi.class.getName()); put("Cipher.ANUBIS Im...
public GnuCrypto() { super(Registry.GNU_CRYPTO, 2.1, "GNU Crypto JCE Provider"); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { // Cipher put("Cipher.ANUBIS", gnu.javax.crypto.jce.cipher.AnubisSpi.class.getName()); put("Cipher.ANUBIS Im...
10,941
public Object run() { // Cipher put("Cipher.ANUBIS", gnu.javax.crypto.jce.cipher.AnubisSpi.class.getName()); put("Cipher.ANUBIS ImplementedIn", "Software"); put("Cipher.ARCFOUR", gnu.javax.crypto.jce.cipher.ARCFourSpi.class.getName()); put("Cipher.ARCF...
public Object run() { // Cipher put("Cipher.ANUBIS", gnu.javax.crypto.jce.cipher.AnubisSpi.class.getName()); put("Cipher.ANUBIS ImplementedIn", "Software"); put("Cipher.ARCFOUR", gnu.javax.crypto.jce.cipher.ARCFourSpi.class.getName()); put("Cipher.ARCF...
10,943
public AlignmentAction(String nm, int a) { super("TODO"); // TODO }
public AlignmentAction(String nm, int a) { super("TODO"); // TODO }
10,949
public void actionPerformed(ActionEvent event) { // TODO }
SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setAlignment(atts, a); setParagraphAttributes(getEditor(event), atts, false); SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setAlignment(atts, a); setParagraphAttributes(getEditor(event), atts, false); SimpleAttributeSet atts = new ...
10,950
public BoldAction() { super("TODO"); // TODO }
public BoldAction() { super("TODO"); // TODO }
10,951
public void actionPerformed(ActionEvent event) { // TODO }
JEditorPane editor = getEditor(event); StyledDocument doc = getStyledDocument(editor); Element el = doc.getCharacterElement(editor.getSelectionStart()); boolean isBold = StyleConstants.isBold(el.getAttributes()); SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setItalic(atts, ! isBold); setCharacterA...
10,952
public FontFamilyAction(String nm, String family) { super("TODO"); // TODO }
public FontFamilyAction(String nm, String family) { super("TODO"); // TODO }
10,953
public void actionPerformed(ActionEvent event) { // TODO }
SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setFontFamily(atts, family); setCharacterAttributes(getEditor(event), atts, false); SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setFontFamily(atts, family); setCharacterAttributes(getEditor(event), atts, false); SimpleAttributeSet...
10,954
public FontSizeAction(String nm, int size) { super("TODO"); // TODO }
public FontSizeAction(String nm, int size) { super("TODO"); // TODO }
10,955
public void actionPerformed(ActionEvent event) { // TODO }
SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setFontSize(atts, size); setCharacterAttributes(getEditor(event), atts, false); SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setFontSize(atts, size); setCharacterAttributes(getEditor(event), atts, false); SimpleAttributeSet atts = ...
10,956
public ForegroundAction(String nm, Color fg) { super("TODO"); // TODO }
public ForegroundAction(String nm, Color fg) { super("TODO"); // TODO }
10,957
public void actionPerformed(ActionEvent event) { // TODO }
SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setForeground(atts, fg); setCharacterAttributes(getEditor(event), atts, false); SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setForeground(atts, fg); setCharacterAttributes(getEditor(event), atts, false); SimpleAttributeSet atts = ...
10,958
public ItalicAction() { super("TODO"); // TODO }
public ItalicAction() { super("TODO"); // TODO }
10,959
public void actionPerformed(ActionEvent event) { // TODO }
JEditorPane editor = getEditor(event); StyledDocument doc = getStyledDocument(editor); Element el = doc.getCharacterElement(editor.getSelectionStart()); boolean isItalic = StyleConstants.isItalic(el.getAttributes()); SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setItalic(atts, ! isItalic); setChar...
10,960
public StyledTextAction(String nm) { super(nm); // TODO }
publicStyledTextAction(Stringnm){ super(nm); //TODO}
10,961
protected final JEditorPane getEditor(ActionEvent event) { return null; // TODO }
protected final JEditorPane getEditor(ActionEvent event) { return (JEditorPane) getTextComponent(event); // TODO }
10,962
protected final StyledDocument getStyledDocument(JEditorPane value0) { return null; // TODO }
protected final StyledDocument getStyledDocument(JEditorPane editor) { return null; // TODO }
10,963
protected final StyledDocument getStyledDocument(JEditorPane value0) { return null; // TODO }
protected final StyledDocument getStyledDocument(JEditorPane value0) { Document doc = editor.getDocument(); if (!(doc instanceof StyledDocument)) throw new AssertionError("The Document for StyledEditorKits is " + "expected to be a StyledDocument."); return (StyledDocument) doc; // TODO }
10,964
protected final StyledEditorKit getStyledEditorKit(JEditorPane value0) { return null; // TODO }
protected final StyledEditorKit getStyledEditorKit(JEditorPane editor) { return null; // TODO }
10,965
protected final StyledEditorKit getStyledEditorKit(JEditorPane value0) { return null; // TODO }
protected final StyledEditorKit getStyledEditorKit(JEditorPane value0) { EditorKit kit = editor.getEditorKit(); if (!(kit instanceof StyledEditorKit)) throw new AssertionError("The EditorKit for StyledDocuments is " + "expected to be a StyledEditorKit."); return (StyledEditorKit) kit; // TODO }
10,966
protected final void setCharacterAttributes(JEditorPane value0, AttributeSet value1, boolean value2) { // TODO }
protected final void setCharacterAttributes(JEditorPane value0, AttributeSet value1, boolean value2) { // TODO }
10,967
protected final void setCharacterAttributes(JEditorPane value0, AttributeSet value1, boolean value2) { // TODO }
Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (StyledDocument) editor.getDocument(); EditorKit kit = editor.getEditorKit(); if (!(kit instanceof StyledEditorKit)) { StyledEditorKit styleKit = (StyledEditorKit) kit; int start = editor.getSelectionStart(); int end = e...
10,968
protected final void setParagraphAttributes(JEditorPane value0, AttributeSet value1, boolean value2) { // TODO }
protected final void setParagraphAttributes(JEditorPane value0, AttributeSet value1, boolean value2) { // TODO }
10,969
protected final void setParagraphAttributes(JEditorPane value0, AttributeSet value1, boolean value2) { // TODO }
Document doc = editor.getDocument(); if (doc instanceof StyledDocument) { StyledDocument styleDoc = (StyledDocument) editor.getDocument(); EditorKit kit = editor.getEditorKit(); if (!(kit instanceof StyledEditorKit)) { StyledEditorKit styleKit = (StyledEditorKit) kit; int start = editor.getSelectionStart(); int end = e...
10,970
public View create(Element value0) { return null; // TODO }
public View create(Element element) { return null; // TODO }
10,971
public View create(Element value0) { return null; // TODO }
public View create(Element value0) { String name = element.getName(); View view = null; if (name.equals(AbstractDocument.ContentElementName)) view = new LabelView(element); else if (name.equals(AbstractDocument.ParagraphElementName)) view = new ParagraphView(element); else if (name.equals(AbstractDocument.Sect...
10,972
public UnderlineAction() { super("TODO"); // TODO }
public UnderlineAction() { super("TODO"); // TODO }
10,973
public void actionPerformed(ActionEvent event) { // TODO }
JEditorPane editor = getEditor(event); StyledDocument doc = getStyledDocument(editor); Element el = doc.getCharacterElement(editor.getSelectionStart()); boolean isUnderline = StyleConstants.isUnderline(el.getAttributes()); SimpleAttributeSet atts = new SimpleAttributeSet(); StyleConstants.setUnderline(atts, ! isUnderli...
10,974
public StyledEditorKit() { // TODO }
inputAttributes = new SimpleAttributeSet(); inputAttributes = new SimpleAttributeSet(); publicinputAttributes = new SimpleAttributeSet(); StyledEditorKit()inputAttributes = new SimpleAttributeSet(); inputAttributes = new SimpleAttributeSet(); { //inputAttributes = new SimpleAttributeSet(); TODOinputAttributes = new Si...
10,975
public Object clone() { return null; // TODO }
public Object clone() { StyledEditorKit clone = (StyledEditorKit) super.clone(); return clone; // TODO }
10,976
public Document createDefaultDocument() { return null; // TODO }
public Document createDefaultDocument() { return new DefaultStyledDocument(); // TODO }
10,977
protected void createInputAttributes(Element element, MutableAttributeSet set) { // TODO }
protected void createInputAttributes(Element element, MutableAttributeSet set) { // TODO }
10,978
protected void createInputAttributes(Element element, MutableAttributeSet set) { // TODO }
AttributeSet atts = element.getAttributes(); set.removeAttributes(set); set.addAttributes(atts); AttributeSet atts = element.getAttributes(); set.removeAttributes(set); set.addAttributes(atts); protectedAttributeSet atts = element.getAttributes(); set.removeAttributes(set); set.addAttributes(atts); voidAttributeSet ...
10,979
public void deinstall(JEditorPane component) { // TODO }
CaretTracker t = caretTracker; if (t != null) component.removeCaretListener(t); caretTracker = null; CaretTracker t = caretTracker; if (t != null) component.removeCaretListener(t); caretTracker = null; publicCaretTracker t = caretTracker; if (t != null) component.removeCaretListener(t); caretTracker = null; voidCaretTr...
10,980
public Action[] getActions() { return null; // TODO }
public Action[] getActions() { Action[] actions1 = super.getActions(); Action[] myActions = new Action[] { new BoldAction(), new ItalicAction(), new UnderlineAction() }; return TextAction.augmentList(actions1, myActions); // TODO }
10,981
public Element getCharacterAttributeRun() { return null; // TODO }
public Element getCharacterAttributeRun() { return currentRun; // TODO }
10,982
public MutableAttributeSet getInputAttributes() { return null; // TODO }
public MutableAttributeSet getInputAttributes() { return inputAttributes; // TODO }
10,983