bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
protected void paintSafely(Graphics g) { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); if (textComponent.isOpaque()) paintBackground(g); if (highlighter != null && textComponent.getSelectionStart() != textComponent.getSelectionEnd()) h...
protected void paintSafely(Graphics g) { Caret caret = textComponent.getCaret(); Highlighter highlighter = textComponent.getHighlighter(); if (textComponent.isOpaque()) paintBackground(g); if (highlighter != null && textComponent.getSelectionStart() != textComponent.getSelectionEnd()) h...
7,408
protected final void setView(View view) { rootView.setView(view); view.setParent(rootView); textComponent.revalidate(); textComponent.repaint(); }
protected final void setView(View view) { rootView.setView(view); textComponent.revalidate(); textComponent.repaint(); }
7,410
public static void main(String[] args) { ParsedArguments cmdLine = HELP_INFO.parse(args); String key = ARG_KEY.getValue(cmdLine); String value = ARG_VALUE.getValue(cmdLine); System.getProperties().setProperty(key, value); }
public static void main(String[] args) throws SyntaxErrorException { ParsedArguments cmdLine = HELP_INFO.parse(args); String key = ARG_KEY.getValue(cmdLine); String value = ARG_VALUE.getValue(cmdLine); System.getProperties().setProperty(key, value); }
7,411
public void addElement(Object object) { list.add(object); fireIntervalAdded(this, list.size(), list.size()); }
public void addElement(Object object) { list.add(object); fireIntervalAdded(this, list.size() - 1, list.size()); }
7,413
public void removeAllElements() { int listSize = getSize(); list.clear(); fireIntervalAdded(this, 0, listSize - 1); }
public void removeAllElements() { int listSize = getSize(); list.clear(); fireIntervalAdded(this, 0, listSize - 1); }
7,414
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString,locString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); int location = e.getKeyLocation(); if (Character.isISOCon...
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString,locString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); if (Character.isISOControl(c)) { charString =...
7,416
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString,locString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); int location = e.getKeyLocation(); if (Character.isISOCon...
protected void displayInfo(KeyEvent e, String s){ String charString, keyCodeString, modString, tmpString,isString,locString; char c = e.getKeyChar(); int keyCode = e.getKeyCode(); int modifiers = e.getModifiers(); int location = e.getKeyLocation(); if (Character.isISOCon...
7,417
protected void pop() throws EmptyStackException { if (prev == null) throw new EmptyStackException(); /* The order is important here, we must get the prev lock first, or deadlock could occur as callers usually get here following prev's next pointer, and thus obtain prev's lock before trying to...
protected void pop() throws EmptyStackException { if (prev == null) throw new EmptyStackException(); /* The order is important here, we must get the prev lock first, or deadlock could occur as callers usually get here following prev's next pointer, and thus obtain prev's lock before trying to...
7,418
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requ...
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requ...
7,420
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requ...
protected void baselineLayout(int span, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(span, requ...
7,421
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { if (sr == null) sr = new SizeRequirements(); sr.alignment = 0.5F; SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float mi...
7,422
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
7,423
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
7,424
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
7,425
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
7,426
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
protected SizeRequirements baselineRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; ...
7,427
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(...
7,428
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
7,429
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
7,430
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
7,431
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
7,432
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements result = sr; if (result == null) result = new SizeRequirements(); long minimum = 0; long preferred =...
7,433
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; float prefLeft = 0; float pr...
7,434
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
7,435
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
7,436
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
7,437
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { updateChildRequirements(axis); SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); float minLeft = 0; float minRight = 0; f...
7,438
protected void childAllocation(int index, Rectangle a) { if (! isAllocationValid()) layout(a.width, a.height); a.x += offsets[X_AXIS][index]; a.y += offsets[Y_AXIS][index]; a.width = spans[X_AXIS][index]; a.height = spans[Y_AXIS][index]; }
protected void childAllocation(int index, Rectangle a) { if (! isAllocationValid()) layout(a.width, a.height); a.x += offsets[X_AXIS][index]; a.y += offsets[Y_AXIS][index]; a.width = spans[X_AXIS][index]; a.height = spans[Y_AXIS][index]; }
7,439
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { updateRequirements(axis); align = requirements[axis].alignment; } return align; }
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { updateRequirements(axis); align = requirements[axis].alignment; } return align; }
7,440
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { updateRequirements(axis); align = requirements[axis].alignment; } return align; }
public float getAlignment(int axis) { float align; if (axis == myAxis) align = 0.5F; else { updateRequirements(axis); align = requirements[axis].alignment; } return align; }
7,441
public int getHeight() { return span[Y_AXIS]; }
public int getHeight() { return span[Y_AXIS] + getTopInset() - getBottomInset(); }
7,442
public float getMaximumSpan(int axis) { float max; if (axis == myAxis) max = getPreferredSpan(axis); else max = Integer.MAX_VALUE; return max; }
public float getMaximumSpan(int axis) { float max; if (axis == myAxis) max = getPreferredSpan(axis); else max = Integer.MAX_VALUE; return max; }
7,443
public float getMaximumSpan(int axis) { float max; if (axis == myAxis) max = getPreferredSpan(axis); else max = Integer.MAX_VALUE; return max; }
public float getMaximumSpan(int axis) { float max; if (axis == myAxis) max = getPreferredSpan(axis); else max = Integer.MAX_VALUE; return max; }
7,444
public float getMinimumSpan(int axis) { updateRequirements(axis); return requirements[axis].minimum; }
public float getMinimumSpan(int axis) { updateRequirements(axis); float margin; if (axis == X_AXIS) margin = getLeftInset() + getRightInset(); else margin = getTopInset() + getBottomInset(); return requirements[axis].minimum + margin; }
7,445
public float getPreferredSpan(int axis) { updateRequirements(axis); return requirements[axis].preferred; }
public float getPreferredSpan(int axis) { updateRequirements(axis); float margin; if (axis == X_AXIS) margin = getLeftInset() + getRightInset(); else margin = getTopInset() + getBottomInset(); return requirements[axis].preferred + margin; }
7,446
public int getWidth() { return span[X_AXIS]; }
public int getWidth() { return span[X_AXIS] + getLeftInset() - getRightInset(); }
7,447
protected boolean isAfter(int x, int y, Rectangle r) { boolean result = false; if (myAxis == X_AXIS) result = x > r.x; else result = y > r.y; return result; }
protected boolean isAfter(int x, int y, Rectangle r) { boolean result = false; if (myAxis == X_AXIS) result = x > r.x + r.width; else result = y > r.y; return result; }
7,448
protected boolean isAfter(int x, int y, Rectangle r) { boolean result = false; if (myAxis == X_AXIS) result = x > r.x; else result = y > r.y; return result; }
protected boolean isAfter(int x, int y, Rectangle r) { boolean result = false; if (myAxis == X_AXIS) result = x > r.x; else result = y > r.y + r.height; return result; }
7,449
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targ...
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targ...
7,450
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targ...
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targ...
7,451
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(ta...
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { updateChildRequirements(axis); updateRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateAlignedPositions(ta...
7,453
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { // Make sure everything is allocated properly and then call super if (! isAllocationValid()) { Rectangle bounds = a.getBounds(); layout(bounds.width, bounds.height); } return super.model...
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { // Make sure everything is allocated properly and then call super if (! isAllocationValid()) { Rectangle bounds = a.getBounds(); setSize(bounds.width, bounds.height); } return super.mode...
7,454
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setB...
public void paint(Graphics g, Shape a) { Rectangle alloc; if (a instanceof Rectangle) alloc = (Rectangle) a; else alloc = a.getBounds(); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); fo...
7,455
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setB...
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); int x = alloc.x + getLeftInset(); int y = alloc.y + getTopInset(); Rectangle clip = g.getClipBounds(); Rectangle tmp = new Recta...
7,456
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setB...
public void paint(Graphics g, Shape a) { Rectangle inside = getInsideAllocation(a); // TODO: Used for debugging. //g.drawRect(inside.x, inside.y, inside.width, inside.height); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setB...
7,457
public void replace(int offset, int length, View[] views) { int numViews = 0; if (views != null) numViews = views.length; // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + numViews]; System.arraycopy(spa...
public void replace(int offset, int length, View[] views) { int numViews = 0; if (views != null) numViews = views.length; // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + numViews]; System.arraycopy(spa...
7,459
public void setSize(float width, float height) { layout((int) width, (int) height); }
public void setSize(float width, float height) { layout((int) (width - getLeftInset() - getRightInset()), (int) (height - getTopInset() - getBottomInset())); }
7,460
private void updateRequirements(int axis) { if (! layoutValid[axis]) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, requirements[axis]); else requirements[axis] = calculateMinorAxisRequi...
private void updateRequirements(int axis) { if (axis != Y_AXIS && axis != X_AXIS) throw new IllegalArgumentException("Illegal axis: " + axis); if (! requirementsValid[axis]) { if (axis == myAxis) requirements[axis] = calculateMajorAxisRequirements(axis, ...
7,461
AttributedString(String str){ sci = new StringCharacterIterator(str); attribs = new AttributeRange[0];}
AttributedString(String str){ sci = new StringCharacterIterator(str); attribs = new AttributeRange[0];}
7,463
addAttribute(AttributedCharacterIterator.Attribute attrib, Object value){ addAttribute(attrib, value, 0, sci.getEndIndex());}
addAttribute(AttributedCharacterIterator.Attribute attrib, Object value){ addAttribute(attrib, value, 0, sci.getEndIndex());}
7,464
addAttributes(Map attributes, int begin_index, int end_index){ if (attributes == null) throw new IllegalArgumentException("null attribute"); if ((begin_index < 0) || (end_index > sci.getEndIndex()) || (end_index < begin_index)) throw new IllegalArgumentException("bad range"); AttributeRange[] new_list = n...
addAttributes(Map attributes, int begin_index, int end_index){ if (attributes == null) throw new IllegalArgumentException("null attribute"); if ((begin_index < 0) || (end_index > sci.getEndIndex()) || (end_index < begin_index)) throw new IllegalArgumentException("bad range"); AttributeRange[] new_list = n...
7,465
getIterator(){ return(new AttributedStringIterator(sci, attribs, 0, sci.getEndIndex(), null));}
getIterator(){ return(new AttributedStringIterator(sci, attribs, 0, sci.getEndIndex(), null));}
7,466
private static void createFields(VmType< ? > cls, FieldData[] fieldDatas, VmSharedStatics sharedStatics, VmIsolatedStatics isolatedStatics, int slotSize, int pragmaFlags) { final int fcount = fieldDatas.length; final VmField[] ftable = new VmField[fcount]; int objectSize =...
private static void createFields(VmType< ? > cls, FieldData[] fieldDatas, VmSharedStatics sharedStatics, VmIsolatedStatics isolatedStatics, int slotSize, int pragmaFlags) { final int fcount = fieldDatas.length; final VmField[] ftable = new VmField[fcount]; int objectSize =...
7,467
public static final VmType defineClass(String className, ByteBuffer data, boolean rejectNatives, VmClassLoader clc, ProtectionDomain protectionDomain) { cl_init(); final VmType cls = decodeClass(data, rejectNatives, clc, protectionDomain); return cls; }
public static final VmType defineClass(String className, ByteBuffer data, boolean rejectNatives, VmClassLoader clc, ProtectionDomain protectionDomain) { cl_init(); final VmType cls = decodeClass(data, rejectNatives, clc, protectionDomain); return cls; }
7,468
protected void setInt(int index, int data) { set(index, new Integer(data)); }
protected void setInt(int index, int data) { set(index, new VmConstInt(data)); }
7,469
protected void setFloat(int index, float data) { set(index, new Float(data)); }
protected void setFloat(int index, float data) { set(index, new VmConstFloat(data)); }
7,470
protected void setLong(int index, long data) { set(index, new Long(data)); }
protected void setLong(int index, long data) { set(index, new VmConstLong(data)); }
7,471
protected void setDouble(int index, double data) { set(index, new Double(data)); }
protected void setDouble(int index, double data) { set(index, new VmConstDouble(data)); }
7,472
public int getInt(int index) { if (index == 0) return 0; else return ((Integer) get(index)).intValue(); }
public int getInt(int index) { if (index == 0) return 0; else return ((VmConstInt) get(index)).intValue(); }
7,473
public double getDouble(int index) { return ((Double) get(index)).doubleValue(); }
public double getDouble(int index) { return ((VmConstDouble) get(index)).doubleValue(); }
7,474
public float getFloat(int index) { return ((Float) get(index)).floatValue(); }
public float getFloat(int index) { return ((VmConstFloat) get(index)).floatValue(); }
7,475
public long getLong(int index) { return ((Long) get(index)).longValue(); }
public long getLong(int index) { return ((VmConstLong) get(index)).longValue(); }
7,476
public PaneButton(Action a) { super(a); setMargin(new Insets(0, 0, 0, 0)); setBorder(null); }
public PaneButton(Action a) { super(a); setMargin(new Insets(0, 0, 0, 0)); }
7,477
public void propertyChange(PropertyChangeEvent evt) { // The title and frameIcon are taken care of during painting time. // The only other thing this will care about are the "is----izable" // properties. So we call enable actions to properly handle the // buttons and menu items for us. ...
public void propertyChange(PropertyChangeEvent evt) { // The title and frameIcon are taken care of during painting time. // The only other thing this will care about are the "is----izable" // properties. So we call enable actions to properly handle the // buttons and menu items for us. ...
7,478
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { Dimension size = c.getSize(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left c...
7,479
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,480
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,481
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,482
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,483
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,484
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,485
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,486
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
public void layoutContainer(Container c) { enableActions(); Insets insets = c.getInsets(); int width = c.getBounds().width - insets.left - insets.right; int height = c.getBounds().height - insets.top - insets.bottom; // MenuBar is always present and located at the top left corner. D...
7,487
public Dimension preferredLayoutSize(Container c) { Insets frameInsets = frame.getInsets(); // Height is the max of the preferredHeights of all components // inside the pane int height = 0; int width = 0; Dimension d; Component[] components = BasicInternalFrameTitlePane.this.ge...
public Dimension preferredLayoutSize(Container c) { Insets frameInsets = frame.getInsets(); // Height is the max of the preferredHeights of all components // inside the pane int height = 0; int width = 0; Dimension d; Component[] components = BasicInternalFrameTitlePane.this.ge...
7,488
protected void createButtons() { closeButton = new PaneButton(closeAction); closeButton.setOpaque(false); iconButton = new PaneButton(iconifyAction); iconButton.setOpaque(false); maxButton = new PaneButton(maximizeAction); maxButton.setOpaque(false); }
protected void createButtons() { closeButton = new PaneButton(closeAction); if (!frame.isClosable()) closeButton.setVisible(false); iconButton = new PaneButton(iconifyAction); iconButton.setOpaque(false); maxButton = new PaneButton(maximizeAction); maxButton.setOpaque(false); }
7,490
protected void createButtons() { closeButton = new PaneButton(closeAction); closeButton.setOpaque(false); iconButton = new PaneButton(iconifyAction); iconButton.setOpaque(false); maxButton = new PaneButton(maximizeAction); maxButton.setOpaque(false); }
protected void createButtons() { closeButton = new PaneButton(closeAction); closeButton.setOpaque(false); iconButton = new PaneButton(iconifyAction); if (!frame.isIconifiable()) iconButton.setVisible(false); maxButton = new PaneButton(maximizeAction); maxButton.setOpaque(false); }
7,491
protected void createButtons() { closeButton = new PaneButton(closeAction); closeButton.setOpaque(false); iconButton = new PaneButton(iconifyAction); iconButton.setOpaque(false); maxButton = new PaneButton(maximizeAction); maxButton.setOpaque(false); }
protected void createButtons() { closeButton = new PaneButton(closeAction); closeButton.setOpaque(false); iconButton = new PaneButton(iconifyAction); iconButton.setOpaque(false); maxButton = new PaneButton(maximizeAction); if (!frame.isMaximizable()) maxButton.setVisible(false); }
7,492
protected void setButtonIcons() { if (closeButton != null) closeButton.setIcon(closeIcon); if (iconButton != null) iconButton.setIcon(iconIcon); if (maxButton != null) maxButton.setIcon(maxIcon); }
protected void setButtonIcons() { if (closeButton != null) closeButton.setIcon(closeIcon); if (iconButton != null) iconButton.setIcon(iconIcon); if (maxButton != null) maxButton.setIcon(maxIcon); }
7,493
public void mouseEntered(MouseEvent ev) { int tabIndex = tabForCoordinate(tabPane, ev.getX(), ev.getY()); setRolloverTab(tabIndex); }
public void mouseEntered(MouseEvent e) { int tabIndex = tabForCoordinate(tabPane, ev.getX(), ev.getY()); setRolloverTab(tabIndex); }
7,496
public void mouseEntered(MouseEvent ev) { int tabIndex = tabForCoordinate(tabPane, ev.getX(), ev.getY()); setRolloverTab(tabIndex); }
public void mouseEntered(MouseEvent ev) { Object s = e.getSource(); if (tabPane != e.getSource()) { redispatchEvent(e); e.setSource(s); } int tabIndex = tabForCoordinate(tabPane, e.getX(), e.getY()); setRolloverTab(tabIndex); }
7,497
public void mouseExited(MouseEvent ev) { setRolloverTab(-1); }
public void mouseExited(MouseEvent e) { setRolloverTab(-1); }
7,498
public void mousePressed(MouseEvent e) { if (tabPane.isEnabled()) { int index = tabForCoordinate(tabPane, e.getX(), e.getY()); if (index >= 0 && tabPane.isEnabledAt(index)) { tabPane.setSelectedIndex(index); } } }
public void mousePressed(MouseEvent e) { Object s = e.getSource(); if (tabPane != e.getSource()) { redispatchEvent(e); e.setSource(s); } int placement = tabPane.getTabPlacement(); if (s == incrButton) { if(!incrButton.isEnabled()) return; currentScrollLocation++; switch (placement) { case JTabbedPan...
7,501
public void mousePressed(MouseEvent e) { if (tabPane.isEnabled()) { int index = tabForCoordinate(tabPane, e.getX(), e.getY()); if (index >= 0 && tabPane.isEnabledAt(index)) { tabPane.setSelectedIndex(index); } } }
public void mousePressed(MouseEvent e) { if (tabPane.isEnabled()) { int index = tabForCoordinate(tabPane, e.getX(), e.getY()); if (!tabPane.isEnabledAt(index)) return; if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT && s == panel) { scrollTab(index, placement); t...
7,502
public void paint(Graphics g, JComponent c) { paintTabArea(g, tabPane.getTabPlacement(), tabPane.getSelectedIndex()); }
public void paint(Graphics g, JComponent c) { int placement = tabPane.getTabPlacement(); g.setColor(highlight); if (placement == SwingUtilities.TOP || placement == SwingUtilities.BOTTOM) g.fillRect(currentScrollOffset, 0, tabAreaRect.width, tabAreaRect.height); else g.fillRect(0, currentScrollOffset, ...
7,503
public void updateUI() { setUI((PanelUI) new ScrollingPanelUI()); }
public void updateUI() { setUI(new ScrollingPanelUI()); }
7,504
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. int count = tabPane.get...
7,506
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
7,507
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
7,508
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
7,509
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; Component c; Dimension dims; // Find out the minimum/preferred size to display the largest child // of the tabbed pane. for (int i = 0; i < tab...
7,510
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
7,511
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
7,512
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
7,513
public void layoutContainer(Container parent) { calculateLayoutInfo(); int tabPlacement = tabPane.getTabPlacement(); Insets insets = tabPane.getInsets(); int selectedIndex = tabPane.getSelectedIndex(); Component selectedComponent = tabPane.getComponentAt(selectedIndex); // The RI do...
public void layoutContainer(Container parent) { calculateLayoutInfo(); int tabPlacement = tabPane.getTabPlacement(); Insets insets = tabPane.getInsets(); int selectedIndex = tabPane.getSelectedIndex(); Component selectedComponent = null; if (selectedIndex >= 0) selectedComponent = tabPan...
7,515
public Dimension minimumLayoutSize(Container parent) { return calculateSize(false); }
public Dimension minimumLayoutSize(Container parent) { return calculateSize(true); }
7,516
protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max) { Insets tabAreaInsets = getTabAreaInsets(tabPlacement); if (tabPlacement == SwingUtilities.TOP || tabPlacement == SwingUtilities.BOTTOM) { // We should only d...
protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max) { if (tabPlacement == SwingUtilities.TOP || tabPlacement == SwingUtilities.BOTTOM) { // We should only do this for runCount - 1, cause we can only shift that ...
7,517
protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max) { Insets tabAreaInsets = getTabAreaInsets(tabPlacement); if (tabPlacement == SwingUtilities.TOP || tabPlacement == SwingUtilities.BOTTOM) { // We should only d...
protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max) { Insets tabAreaInsets = getTabAreaInsets(tabPlacement); if (tabPlacement == SwingUtilities.TOP || tabPlacement == SwingUtilities.BOTTOM) { // We should only d...
7,518
protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max) { Insets tabAreaInsets = getTabAreaInsets(tabPlacement); if (tabPlacement == SwingUtilities.TOP || tabPlacement == SwingUtilities.BOTTOM) { // We should only d...
protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max) { Insets tabAreaInsets = getTabAreaInsets(tabPlacement); if (tabPlacement == SwingUtilities.TOP || tabPlacement == SwingUtilities.BOTTOM) { // We should only d...
7,519
protected void rotateTabRuns(int tabPlacement, int selectedRun) { if (runCount == 1 || selectedRun == 1 || selectedRun == -1) return; int[] newTabRuns = new int[tabRuns.length]; int currentRun = selectedRun; int i = 1; do { newTabRuns[i] = tabRuns[currentRun]; ...
protected void rotateTabRuns(int tabPlacement, int selectedRun) { if (runCount == 1 || selectedRun == 0 || selectedRun == -1) return; int[] newTabRuns = new int[tabRuns.length]; int currentRun = selectedRun; int i = 1; do { newTabRuns[i] = tabRuns[currentRun]; ...
7,520
protected void rotateTabRuns(int tabPlacement, int selectedRun) { if (runCount == 1 || selectedRun == 1 || selectedRun == -1) return; int[] newTabRuns = new int[tabRuns.length]; int currentRun = selectedRun; int i = 1; do { newTabRuns[i] = tabRuns[currentRun]; ...
protected void rotateTabRuns(int tabPlacement, int selectedRun) { if (runCount == 1 || selectedRun == 1 || selectedRun == -1) return; int[] newTabRuns = new int[tabRuns.length]; int currentRun = selectedRun; int i = 0; do { newTabRuns[i] = tabRuns[currentRun]; ...
7,521