bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public ActivationDesc(String className, String location, MarshalledObject data) throws ActivationException { this(ActivationGroup.currentGroupID(), className, location, data, false);}
public ActivationDesc(String className, String location, MarshalledObject data) throws ActivationException { this(ActivationGroup.currentGroupID(), className, location, data, false);}
7,048
public ActivationDesc(String className, String location, MarshalledObject data) throws ActivationException { this(ActivationGroup.currentGroupID(), className, location, data, false);}
public ActivationDesc(String className, String location, MarshalledObject data) throws ActivationException { this(ActivationGroup.currentGroupID(), className, location, data, false);}
7,049
public boolean equals(Object obj) { if (!(obj instanceof ActivationDesc)) { return (false); } ActivationDesc that = (ActivationDesc)obj; if (this.groupid.equals(that.groupid) && this.classname.equals(that.classname) && this.location.equals(that.location) && this.data.equals(that.data) && this.restart =...
public boolean equals(Object obj) { if (!(obj instanceof ActivationDesc)) { return (false); } ActivationDesc that = (ActivationDesc)obj; if (this.groupid.equals(that.groupid) && this.classname.equals(that.classname) && this.location.equals(that.location) && this.data.equals(that.data) && this.restart =...
7,050
public String getClassName() { return (classname);}
public String getClassName() { return (classname);}
7,051
public MarshalledObject getData() { return (data);}
public MarshalledObject getData() { return (data);}
7,052
public ActivationGroupID getGroupID() { return (groupid);}
public ActivationGroupID getGroupID() { return (groupid);}
7,053
public String getLocation() { return (location);}
public String getLocation() { return (location);}
7,054
public boolean getRestartMode() { return (restart);}
public boolean getRestartMode() { return (restart);}
7,055
public int hashCode() { return (groupid.hashCode() ^ classname.hashCode() ^ location.hashCode() ^ data.hashCode());}
public int hashCode() { return (groupid.hashCode() ^ classname.hashCode() ^ location.hashCode() ^ data.hashCode());}
7,056
protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); Rectangle alloc = c.isValid() ? c.getBounds() : new Rectangle(c.getPreferredSize()); updateMetrics(); try { getDocument().getText(p0, p1 - p0, getLineBuffer()); } catch...
protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); Rectangle alloc = c.isValid() ? c.getBounds() : new Rectangle(c.getPreferredSize()); updateMetrics(); try { getDocument().getText(p0, p1 - p0, getLineBuffer()); } catch...
7,057
public Document createDefaultDocument() { HTMLDocument document = new HTMLDocument(); document.setParser(getParser()); return document; }
public Document createDefaultDocument() { HTMLDocument document = new HTMLDocument(getStyleSheet()); document.setParser(getParser()); return document; }
7,058
public ComponentView(Element elem) { super(elem); }
public ComponentView(Element elem) { super(elem); }
7,061
public void importStyleSheet(URL url) { try { // FIXME: Need to make sure url points to a valid CSS document. loadRules(new BufferedReader(new InputStreamReader(url.openStream())), url); } catch (IOException ioe) { // Do nothing here. } }
public void importStyleSheet(URL url) { try { // FIXME: Need to make sure url points to a valid CSS document. loadRules(new BufferedReader(new InputStreamReader(url.openStream())), url); } catch (IOException ioe) { // Do nothing here. } }
7,062
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = just...
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != -1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = justN...
7,063
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = just...
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = just...
7,064
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = just...
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = just...
7,065
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = just...
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); char shortName = 0; if (justName.length() == 1) shortName = just...
7,066
private void handleShortOptions(String option) throws OptionException { for (int i = 1; i < option.length(); ++i) { handleShortOption(option.charAt(i)); } }
private void handleShortOptions(String option) throws OptionException { for (int charIndex = 1; charIndex < option.length(); ++charIndex) { handleShortOption(option.charAt(i)); } }
7,067
private void handleShortOptions(String option) throws OptionException { for (int i = 1; i < option.length(); ++i) { handleShortOption(option.charAt(i)); } }
private void handleShortOptions(String option) throws OptionException { for (int i = 1; i < option.length(); ++i) { char optChar = option.charAt(charIndex); Option found = null; for (int i = options.size() - 1; i >= 0; --i) { Option opt = (Option) options.get(i); if (optChar == opt.getShortName()) { f...
7,068
public void printHelp(PrintStream out, boolean longOnly) { // Compute maximum lengths. int maxArgLen = 0; boolean shortOptionSeen = false; Iterator it; // The first pass only looks to see if we have a short option. it = options.iterator(); while (it.hasNext()) { Option option = (Opti...
public void printHelp(PrintStream out, boolean longOnly) { // Compute maximum lengths. int maxArgLen = 0; boolean shortOptionSeen = false; Iterator it; // The first pass only looks to see if we have a short option. it = options.iterator(); while (it.hasNext()) { Option option = (Opti...
7,069
public void run() { for (;serverThread != null;) { // if serverThread==null, then exit thread try {//System.out.println("Waiting for connection on " + serverPort); UnicastConnection conn = getServerConnection(); // use a thread pool to improve performance //ConnectionRunnerPool.dispatchConnection(conn);...
public void run() { for (;serverThread != null;) { // if serverThread==null, then exit thread try {//System.out.println("Waiting for connection on " + serverPort); UnicastConnection conn = getServerConnection(); // use a thread pool to improve performance //ConnectionRunnerPool.dispatchConnection(conn);...
7,071
public void connect() { failIfConnected(); if (!isSignificant(this.user)) { connectSimple(); } else { if (this.embeddedSignon) connectEmbedded(); else connectSimulated(); Runnable runnable = new Runnable() { int tryConnection; public void run() ...
public void connect() { failIfConnected(); if (!isSignificant(this.user)) { connectSimple(); } else { if (this.embeddedSignon) connectEmbedded(); else connectSimulated(); Runnable runnable = new Runnable() { int tryConnection; public void run() ...
7,072
public void run() { if ((tryConnection++ < 30) && //If it is still not connected after 3 seconds, //stop with trying (session.isConnected() == false)) { try { Thread.currentThread().sleep(100); ...
public void run() { if ((tryConnection++ < 30) && //If it is still not connected after 3 seconds, //stop with trying (session.isConnected() == false)) { try { Thread.sleep(100); } ...
7,073
public void executeCall() throws Exception { byte returncode; ObjectInput oin; // signal the call when constructing try { DataOutputStream dout = conn.getDataOutputStream(); dout.write(MESSAGE_CALL); oout = conn.getObjectOutputStream(); objid.write(oout); oout.writeInt(opnum); oout.writeLong(ha...
public void executeCall() throws Exception { byte returncode; ObjectInput oin; // signal the call when constructing try { DataOutputStream dout = conn.getDataOutputStream(); dout.write(MESSAGE_CALL); oout = conn.getObjectOutputStream(); objid.write(oout); oout.writeInt(opnum); oout.writeLong(ha...
7,074
public void executeCall() throws Exception { byte returncode; ObjectInput oin; // signal the call when constructing try { DataOutputStream dout = conn.getDataOutputStream(); dout.write(MESSAGE_CALL); oout = conn.getObjectOutputStream(); objid.write(oout); oout.writeInt(opnum); oout.writeLong(ha...
public void executeCall() throws Exception { byte returncode; ObjectInput oin; // signal the call when constructing try { DataOutputStream dout = conn.getDataOutputStream(); dout.write(MESSAGE_CALL); oout = conn.getObjectOutputStream(); objid.write(oout); oout.writeInt(opnum); oout.writeLong(ha...
7,075
public void write(ObjectOutput out) throws IOException { DataOutput dout = (DataOutput)out; dout.writeLong(objNum); space.write(dout);}
public void write(ObjectOutput out) throws IOException { DataOutput dout = (DataOutput)out; dout.writeLong(objNum); space.write(dout);}
7,076
public void write(ObjectOutput out) throws IOException { DataOutput dout = (DataOutput)out; dout.writeLong(objNum); space.write(dout);}
public void write(ObjectOutput out) throws IOException { DataOutput dout = (DataOutput)out; dout.writeLong(objNum); space.write(dout);}
7,077
public static UID read(DataInput in) throws IOException { UID id = new UID(); id.unique = in.readInt(); id.time = in.readLong(); id.count = in.readShort(); return (id);}
public static UID read(DataInput in) throws IOException { UID id = new UID(); id.unique = in.readInt(); id.time = in.readLong(); id.count = in.readShort(); return (id);}
7,078
private void jbInit() throws Exception { this.setTitle(LangTool.getString("spool.title")); this.setIconImage(GUIGraphicsUtils.getApplicationIcon().getImage()); this.getContentPane().add(createFilterPanel(), BorderLayout.NORTH); // get an instance of our table model stm = new SpoolTableModel(...
private void jbInit() throws Exception { this.setTitle(LangTool.getString("spool.title")); this.setIconImage(GUIGraphicsUtils.getApplicationIcon().getImage()); this.getContentPane().add(createFilterPanel(), BorderLayout.NORTH); // get an instance of our table model stm = new SpoolTableModel(...
7,079
public void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { ...
public synchronized void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchroni...
7,080
public void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { ...
public void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } gg2d.drawIma...
7,081
public void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { ...
public void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) { /** * @todo this is a hack and should be fixed at the root of the problem */ if (gg2d == null) { System.out.println(" we got a null graphic object "); return; } synchronized (lock) { ...
7,082
private void writeObject(ObjectOutputStream is) throws IOException { }
private void writeObject(ObjectOutputStream os) throws IOException { }
7,086
public static void set32(byte[] data, int offset, long value) { data[offset] = (byte)(value & 0xFF); data[offset+1] = (byte)((value >> 8) & 0xFF); data[offset+2] = (byte)((value >> 16) & 0xFF); data[offset+3] = (byte)((value >> 32) & 0xFF); }
public static void set32(byte[] data, int offset, long value) { data[offset] = (byte)(value & 0xFF); data[offset+1] = (byte)((value >> 8) & 0xFF); data[offset+2] = (byte)((value >> 16) & 0xFF); data[offset+3] = (byte)((value >> 32) & 0xFF); }
7,088
public synchronized void setData(byte[] buf) { // This form of setData requires setLength to be called separately // and subsequently. if (buf == null) throw new NullPointerException("Null buffer"); buffer = buf; }
public synchronized void setData(byte[] buf) { // This form of setData requires setLength to be called separately // and subsequently. if (buf == null) throw new NullPointerException("Null buffer"); buffer = buf; }
7,095
public SwingChoicePeer(Choice choice) { super(); SwingToolkit.add(choice, this); SwingToolkit.copyAwtProperties(choice, this); final int cnt = choice.getItemCount(); for (int i = 0; i < cnt; i++) { addItem(choice.getItem(i), i); } }
public SwingChoicePeer(Choice choice) { super(); SwingToolkit.add(choice, this); SwingToolkit.copyAwtProperties(choice, this); final int cnt = choice.getItemCount(); for (int i = 0; i < cnt; i++) { addItem(choice.getItem(i), i); } }
7,096
public boolean isLeaf() { return (childValue == null || !(childValue instanceof Hashtable || childValue instanceof Vector || childValue.getClass() .isArray())); }
public boolean isLeaf() { return (childValue == null || !(childValue instanceof Hashtable || childValue instanceof Vector || childValue.getClass() .isArray())); }
7,097
public void setLeadSelectionPath(TreePath path) { if (selectionModel != null) { TreePath oldValue = selectionModel.getLeadSelectionPath(); if (path.equals(oldValue)) return; // Repaint the previous and current rows with the lead selection path. if (path != null) ...
public void setLeadSelectionPath(TreePath path) { if (selectionModel != null) { TreePath oldValue = selectionModel.getLeadSelectionPath(); if (path.equals(oldValue)) return; // Repaint the previous and current rows with the lead selection path. if (path != null) ...
7,098
public TreePath[] getPaths() { return (TreePath[]) paths.clone(); } // getPaths()
public TreePath[] getPaths() { return (TreePath[]) paths.clone(); } // getPaths()
7,099
protected RegisterGroupUsage[] initialize() { // The order of this array determines the cost of using the // register. // The cost of a register is lower when its index in this // array is higher. return new RegisterGroupUsage[] { new Reg...
protected RegisterGroupUsage[] initialize() { // The order of this array determines the cost of using the // register. // The cost of a register is lower when its index in this // array is higher. return new RegisterGroupUsage[] { new Reg...
7,101
public X86Register request(Item owner, int jvmType, boolean supportBits8) { final int cnt = regs.length; for (int i = 0; i < cnt; i++) { final RegisterEntry re = regs[i]; if (re.jvmType == jvmType) { if (!supportBits8 || re.re...
public X86Register request(Item owner, int jvmType, boolean supportBits8) { final int cnt = regs.length; for (int i = 0; i < cnt; i++) { final RegisterEntry re = regs[i]; if (re.jvmType == jvmType) { if (!supportBits8 || re.re...
7,102
public X86RegisterPool() { this.registers = initialize(); this.regCount = registers.length; }
public X86RegisterPool(boolean lastFirst, int minimumRequestIndex) { this.lastFirst = lastFirst; this.minimumRequestIndex = minimumRequestIndex; this.registers = initialize(); this.regCount = registers.length; }
7,103
public void mouseMoved(MouseEvent e) { // Not interested in where the mouse // is unless it is being dragged. }
if (thumbRect.contains(e.getPoint())) thumbRollover = true; else thumbRollover = false; if (thumbRect.contains(e.getPoint())) thumbRollover = true; else thumbRollover = false; public void mouseMoved(MouseEvent e)if (thumbRect.contains(e.getPoint())) thumbRollover = true; else thumbRollover = false; if (thumbRect.contai...
7,106
boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (thumbRect.contains(currentMouseX, currentMouseY)) return false; if (direction == POSITI...
boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (thumbRect.contains(currentMouseX, currentMouseY)) return false; if (direction == POSITI...
7,107
boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (thumbRect.contains(currentMouseX, currentMouseY)) return false; if (direction == POSITI...
boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (thumbRect.contains(currentMouseX, currentMouseY)) return false; if (direction == POSITI...
7,108
protected void installComponents() { int orientation = scrollbar.getOrientation(); switch (orientation) { case (JScrollBar.HORIZONTAL): incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncreaseButton(...
protected void installComponents() { int orientation = scrollbar.getOrientation(); switch (orientation) { case JScrollBar.HORIZONTAL: incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncreaseButton(SO...
7,109
int valueForXPosition(int xPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
int valueForXPosition(int xPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
7,112
int valueForXPosition(int xPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
int valueForXPosition(int xPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.width; int value; // If the length is 0, you shouldn't be able to even see where the slider is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
7,113
int valueForYPosition(int yPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the thumb is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
int valueForYPosition(int yPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the thumb is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
7,114
int valueForYPosition(int yPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the thumb is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
int valueForYPosition(int yPos) { int min = scrollbar.getMinimum(); int max = scrollbar.getMaximum(); int len = trackRect.height; int value; // If the length is 0, you shouldn't be able to even see where the thumb is. // This really shouldn't ever happen, but just in case, we'll return the middle. ...
7,115
public void mousePressed(MouseEvent e) { scrollTimer.stop(); scrollListener.setScrollByBlock(false); if (e.getSource() == incrButton) scrollListener.setDirection(POSITIVE_SCROLL); else scrollListener.setDirection(NEGATIVE_SCROLL); scrollTimer.start(); }
public void mousePressed(MouseEvent e) { scrollTimer.stop(); scrollListener.setScrollByBlock(false); if (e.getSource() == incrButton) scrollListener.setDirection(POSITIVE_SCROLL); else scrollListener.setDirection(NEGATIVE_SCROLL); scrollTimer.start(); }
7,116
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { ((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener); scrollbar.getModel().addChangeListener(modelListener); getThumbBounds(); } else if (e.getPropertyName().equals("o...
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { ((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener); scrollbar.getModel().addChangeListener(modelListener); getThumbBounds(); } else if (e.getPropertyName().equals("o...
7,118
public void actionPerformed(ActionEvent e) { if (block) { // Only need to check it if it's block scrolling // We only block scroll if the click occurs // in the track. if (!trackListener.shouldScroll(direction)) { trackHighlight = NO_HIGHLIGHT; scrollbar.repaint(); ...
public void actionPerformed(ActionEvent e) { if (block) { // Only need to check it if it's block scrolling // We only block scroll if the click occurs // in the track. if (!trackListener.shouldScroll(direction)) { trackHighlight = NO_HIGHLIGHT; scrollbar.repaint(); ...
7,119
public void actionPerformed(ActionEvent e) { if (block) { // Only need to check it if it's block scrolling // We only block scroll if the click occurs // in the track. if (!trackListener.shouldScroll(direction)) { trackHighlight = NO_HIGHLIGHT; scrollbar.repaint(); ...
public void actionPerformed(ActionEvent e) { if (block) { // Only need to check it if it's block scrolling // We only block scroll if the click occurs // in the track. if (!trackListener.shouldScroll(direction)) { trackHighlight = NO_HIGHLIGHT; scrollbar.repaint(); ...
7,120
public void actionPerformed(ActionEvent e) { if (block) { // Only need to check it if it's block scrolling // We only block scroll if the click occurs // in the track. if (!trackListener.shouldScroll(direction)) { trackHighlight = NO_HIGHLIGHT; scrollbar.repaint(); ...
public void actionPerformed(ActionEvent e) { if (block) { // Only need to check it if it's block scrolling // We only block scroll if the click occurs // in the track. if (!trackListener.shouldScroll(direction)) { trackHighlight = NO_HIGHLIGHT; scrollbar.repaint(); ...
7,121
public void mouseDragged(MouseEvent e) { currentMouseX = e.getX(); currentMouseY = e.getY(); if (scrollbar.getValueIsAdjusting()) { int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX) - offset; else value = valueFo...
public void mouseDragged(MouseEvent e) { currentMouseX = e.getX(); currentMouseY = e.getY(); if (scrollbar.getValueIsAdjusting()) { int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX) - offset; else value = valueFo...
7,122
public void mousePressed(MouseEvent e) { currentMouseX = e.getX(); currentMouseY = e.getY(); int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (value == scrollbar.getVal...
public void mousePressed(MouseEvent e) { currentMouseX = e.getX(); currentMouseY = e.getY(); int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (value == scrollbar.getVal...
7,123
public void mousePressed(MouseEvent e) { currentMouseX = e.getX(); currentMouseY = e.getY(); int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (value == scrollbar.getVal...
public void mousePressed(MouseEvent e) { currentMouseX = e.getX(); currentMouseY = e.getY(); int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (value == scrollbar.getVal...
7,124
public void mouseReleased(MouseEvent e) { trackHighlight = NO_HIGHLIGHT; scrollTimer.stop(); if (scrollbar.getValueIsAdjusting()) scrollbar.setValueIsAdjusting(false); scrollbar.repaint(); }
public void mouseReleased(MouseEvent e) { trackHighlight = NO_HIGHLIGHT; scrollTimer.stop(); if (scrollbar.getValueIsAdjusting()) scrollbar.setValueIsAdjusting(false); scrollbar.repaint(); }
7,125
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
7,126
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
7,127
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
7,128
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
public boolean shouldScroll(int direction) { int value; if (scrollbar.getOrientation() == HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY); if (direction == POSITIVE_SCROLL) return (value > scrollbar.getValue()); els...
7,129
protected void configureScrollBarColors() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); trackColor = defaults.getColor("ScrollBar.track"); trackHighlightColor = defaults.getColor("ScrollBar.trackHighlight"); thumbColor = defaults.getColor("ScrollBar.thumb"); thumbHighlightColor = defau...
protected void configureScrollBarColors() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); trackColor = defaults.getColor("ScrollBar.track"); trackHighlightColor = defaults.getColor("ScrollBar.trackHighlight"); thumbColor = defaults.getColor("ScrollBar.thumb"); thumbHighlightColor = defau...
7,130
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
7,131
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
7,132
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbR...
7,133
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(50, null); scrollTimer.setRepeats(true); installComponents(); installDefaults(); configureScrollBarColors()...
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(50, null); scrollTimer.setRepeats(true); installComponents(); installDefaults(); configureScrollBarColors()...
7,134
protected void paintDecreaseHighlight(Graphics g) { Color saved = g.getColor(); g.setColor(trackHighlightColor); if (scrollbar.getOrientation() == HORIZONTAL) g.fillRect(trackRect.x, trackRect.y, thumbRect.x - trackRect.x, trackRect.height); else g.fillRect(trackRect.x, trackRec...
protected void paintDecreaseHighlight(Graphics g) { Color saved = g.getColor(); g.setColor(trackHighlightColor); if (scrollbar.getOrientation() == HORIZONTAL) g.fillRect(trackRect.x, trackRect.y, thumbRect.x - trackRect.x, trackRect.height); else g.fillRect(trackRect.x, trackRec...
7,135
protected void paintIncreaseHighlight(Graphics g) { Color saved = g.getColor(); g.setColor(trackHighlightColor); if (scrollbar.getOrientation() == HORIZONTAL) g.fillRect(thumbRect.x + thumbRect.width, trackRect.y, trackRect.x + trackRect.width - thumbRect.x - thumbRect.width, ...
protected void paintIncreaseHighlight(Graphics g) { Color saved = g.getColor(); g.setColor(trackHighlightColor); if (scrollbar.getOrientation() == HORIZONTAL) g.fillRect(thumbRect.x + thumbRect.width, trackRect.y, trackRect.x + trackRect.width - thumbRect.x - thumbRect.width, ...
7,136
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
7,137
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
7,138
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
7,139
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
protected void uninstallListeners() { scrollTimer.removeActionListener(scrollListener); scrollbar.getModel().removeChangeListener(modelListener); scrollbar.removePropertyChangeListener(propertyChangeListener); decrButton.removeMouseListener(buttonListener); incrButton.removeMouseListener(butto...
7,140
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
7,141
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
7,142
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
7,143
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
public void uninstallUI(JComponent c) { uninstallDefaults(); uninstallListeners(); uninstallComponents(); scrollTimer = null; thumbRect = null; trackRect = null; trackColor = null; trackHighlightColor = null; thumbColor = null; thumbHighlightColor = null; thumbDarkShadowC...
7,144
public final void printMe() { Thread printerThread = new PrinterThread(screen,font,numCols,numRows,colorBg); printerThread.start();// //--- Create a printerJob object// PrinterJob printJob = PrinterJob.getPrinterJob ();// printJob.setJobName("tn5250j");//// //--- Set the printable class...
public final void printMe() { Thread printerThread = new PrinterThread(screen,font,numCols,numRows,colorBg); printerThread.start();// //--- Create a printerJob object// PrinterJob printJob = PrinterJob.getPrinterJob ();// printJob.setJobName("tn5250j");//// //--- Set the printable class...
7,145
private final void resizeScreenArea(int width, int height) { Font k = null; LineMetrics l; FontRenderContext f = null; k = GUIGraphicsUtils.getDerivedFont(font,width,height,numRows,numCols,sfh,sfw,ps132); f = new FontRenderContext(k.getTransform(),true,true); l = k.getLineMetrics("Wy",f...
private final void resizeScreenArea(int width, int height) {Font k = null;LineMetrics l;FontRenderContext f = null;k = GUIGraphicsUtils.getDerivedFont(font,width,height,numRows,numCols,sfh,sfw,ps132);f = new FontRenderContext(k.getTransform(),true,true);l = k.getLineMetrics("Wy",f);if (font.getSize() != k.getSize() || ...
7,146
private final void resizeScreenArea(int width, int height) { Font k = null; LineMetrics l; FontRenderContext f = null; k = GUIGraphicsUtils.getDerivedFont(font,width,height,numRows,numCols,sfh,sfw,ps132); f = new FontRenderContext(k.getTransform(),true,true); l = k.getLineMetrics("Wy",f...
private final void resizeScreenArea(int width, int height) {Font k = null;LineMetrics l;FontRenderContext f = null;k = GUIGraphicsUtils.getDerivedFont(font,width,height,numRows,numCols,sfh,sfw,ps132);f = new FontRenderContext(k.getTransform(),true,true);l = k.getLineMetrics("Wy",f);if (font.getSize() != k.getSize() ||...
7,147
public void updateDirty() { // update the image updateImage(dirty); // update dirty to show that we have already painted that region of the // screen so do not do it again. dirty.setBounds(dirty.x,dirty.height,dirty.width,(int)(tArea.getHeight() - dirty.height)); }
public void updateDirty() { // update the image updateImage(r); // update dirty to show that we have already painted that region of the // screen so do not do it again. dirty.setBounds(dirty.x,dirty.height,dirty.width,(int)(tArea.getHeight() - dirty.height)); }
7,148
public float getSpan(GlyphView view, int p0, int p1, TabExpander te, float x) { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(font); Segment txt = view.getText(p0, p1); int span = Utilities....
public float getSpan(GlyphView view, int p0, int p1, TabExpander te, float x) { Font font = view.getFont(); FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(font); Segment txt = view.getText(p0, p1); int span = Utilities.getTabbedTextWidth(txt, fm, (int...
7,149
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
7,150
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
7,151
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
public Shape modelToView(GlyphView view, int pos, Position.Bias b, Shape a) throws BadLocationException { Element el = view.getElement(); Font font = view.getFont(); FontMetrics fm = view.getContainer().getFontMetrics(font); Segment txt = view.getText(el.getSt...
7,152
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
7,153
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
7,154
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
7,155
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try ...
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try { int start = getStartOffset(); ...
7,156
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try ...
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. Segment txt = new Segment(); try { int start = getStartOffset(); int length = g...
7,157
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else ...
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else align = super.ge...
7,158
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); align = (height - descent) / height; } else ...
public float getAlignment(int axis) { float align; if (axis == Y_AXIS) { checkPainter(); GlyphPainter painter = getGlyphPainter(); float height = painter.getHeight(this); float descent = painter.getDescent(this); float ascent = painter.getAscent(this); if (isSuperscript(...
7,159
public Font getFont() { Element el = getElement(); AttributeSet atts = el.getAttributes(); String family = StyleConstants.getFontFamily(atts); int size = StyleConstants.getFontSize(atts); int style = Font.PLAIN; if (StyleConstants.isBold(atts)) style |= Font.BOLD; if (StyleConstants.isIta...
public Font getFont() { Element el = getElement(); AttributeSet atts = el.getAttributes(); String family = StyleConstants.getFontFamily(atts); int size = StyleConstants.getFontSize(atts); int style = Font.PLAIN; if (StyleConstants.isBold(atts)) style |= Font.BOLD; if (StyleConstants.isIta...
7,160
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (T...
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); switch (axis) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpa...
7,161
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (T...
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { case X_AXIS: TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) pa...
7,162
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (T...
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); if (axis == X_AXIS) { Element el = getElement(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (T...
7,163
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
public void paint(Graphics g, Shape a) { checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
7,164
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); }
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); int p0 = getStartOffset(); int p1 = getEndOffset(); Container c = getContainer(); if (c instanceof JTextComponent) { JTextComponent tc = (JTextComponent) c; Highlighter h = tc.getHighlighter(); if (h instanceof LayeredHigh...
7,165
public int getIconHeight() { return 12; }
public int getIconHeight() { return 12; }
7,166