bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public int getAccessibleIndexInParent() throws NotImplementedException { // FIXME: Implement this properly. return 0; }
public int getAccessibleIndexInParent() { // FIXME: Implement this properly. return 0; }
6,821
public int getAccessibleIndexInParent() throws NotImplementedException { // FIXME: Implement this properly. return 0; }
public int getAccessibleIndexInParent() throws NotImplementedException { // FIXME: Implement this properly. return indexOfTab(title); }
6,822
public AccessibleStateSet getAccessibleStateSet() throws NotImplementedException { // FIXME: Implement this properly. return null; }
public AccessibleStateSet getAccessibleStateSet() { // FIXME: Implement this properly. return null; }
6,823
public AccessibleStateSet getAccessibleStateSet() throws NotImplementedException { // FIXME: Implement this properly. return null; }
public AccessibleStateSet getAccessibleStateSet() throws NotImplementedException { // FIXME: Implement this properly. AccessibleContext parentCtx = JTabbedPane.this.getAccessibleContext(); AccessibleStateSet state = parentCtx.getAccessibleStateSet(); state.add(AccessibleState.SELECTABLE); if (component == getSelectedComponent()) state.add(AccessibleState.SELECTED); return state; }
6,824
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJTabbedPane(); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { AccessibleJTabbedPane ctx = new AccessibleJTabbedPane(); addChangeListener(ctx); accessibleContext = ctx; } return accessibleContext; }
6,825
protected String paramString() { return "JTabbedPane"; }
protected String paramString() { StringBuffer sb = new StringBuffer(super.paramString()); sb.append(",tabPlacement="); if (tabPlacement == TOP) sb.append("TOP"); if (tabPlacement == BOTTOM) sb.append("BOTTOM"); if (tabPlacement == LEFT) sb.append("LEFT"); if (tabPlacement == RIGHT) sb.append("RIGHT"); return sb.toString(); }
6,826
public Object run() { proxyHostname = System.getProperty("http.proxyHost"); if (proxyHostname != null && proxyHostname.length() > 0) { String port = System.getProperty("http.proxyPort"); if (port != null && port.length() > 0) { proxyPort = Integer.parseInt(port); } else { proxyHostname = null; proxyPort = -1; } } agent = System.getProperty("http.agent"); String ka = System.getProperty("http.keepAlive"); keepAlive = !(ka != null && "false".equals(ka)); String mc = System.getProperty("http.maxConnections"); maxConnections = (mc != null && mc.length() > 0) ? Math.max(Integer.parseInt(mc), 1) : 5; return null; }
public Object run() { proxyHostname = System.getProperty("http.proxyHost"); if (proxyHostname != null && proxyHostname.length() > 0) { String port = System.getProperty("http.proxyPort"); if (port != null && port.length() > 0) { proxyPort = Integer.parseInt(port); } else { proxyHostname = null; proxyPort = -1; } } agent = System.getProperty("http.agent"); String ka = System.getProperty("http.keepAlive"); keepAlive = !(ka != null && "false".equals(ka)); String mc = System.getProperty("http.maxConnections"); maxConnections = (mc != null && mc.length() > 0) ? Math.max(Integer.parseInt(mc), 1) : 5; return null; }
6,827
HTTPConnection getConnection(String host, int port, boolean secure) throws IOException { HTTPConnection connection; if (keepAlive) { Object key = HTTPConnection.getPoolKey(host, port, secure); synchronized (connectionPool) { connection = (HTTPConnection) connectionPool.remove(key); if (connection == null) { connection = new HTTPConnection(host, port, secure); connection.setPool(connectionPool); } } } else { connection = new HTTPConnection(host, port, secure); } return connection; }
HTTPConnection getConnection(String host, int port, boolean secure) throws IOException { HTTPConnection connection; if (keepAlive) { Object key = HTTPConnection.getPoolKey(host, port, secure); synchronized (connectionPool) { connection = (HTTPConnection) connectionPool.remove(key); if (connection == null) { connection = new HTTPConnection(host, port, secure); connection.setPool(connectionPool); } } } else { connection = new HTTPConnection(host, port, secure); } return connection; }
6,828
protected int layoutRow(FlowView fv, int rowIndex, int pos) { View row = fv.getView(rowIndex); int axis = fv.getFlowAxis(); int span = fv.getFlowSpan(rowIndex); int x = fv.getFlowStart(rowIndex); int offset = pos; View logicalView = getLogicalView(fv); // Special case when span == 0. We need to layout the row as if it had // a span of Integer.MAX_VALUE. if (span == 0) span = Integer.MAX_VALUE; while (span > 0) { if (logicalView.getViewIndex(offset, Position.Bias.Forward) == -1) break; View view = createView(fv, offset, span, rowIndex); if (view == null) break; int viewSpan = (int) view.getPreferredSpan(axis); row.append(view); int breakWeight = view.getBreakWeight(axis, x, span); if (breakWeight >= View.ForcedBreakWeight) break; x += viewSpan; span -= viewSpan; offset += (view.getEndOffset() - view.getStartOffset()); } if (span < 0) { int flowStart = fv.getFlowStart(axis); int flowSpan = fv.getFlowSpan(axis); adjustRow(fv, rowIndex, flowSpan, flowStart); int rowViewCount = row.getViewCount(); offset = row.getView(rowViewCount - 1).getEndOffset(); } return offset; }
protected int layoutRow(FlowView fv, int rowIndex, int pos) { View row = fv.getView(rowIndex); int axis = fv.getFlowAxis(); int span = fv.getFlowSpan(rowIndex); int x = fv.getFlowStart(rowIndex); int offset = pos; View logicalView = getLogicalView(fv); // Special case when span == 0. We need to layout the row as if it had // a span of Integer.MAX_VALUE. if (span == 0) span = Integer.MAX_VALUE; while (span > 0) { if (logicalView.getViewIndex(offset, Position.Bias.Forward) == -1) break; View view = createView(fv, offset, span, rowIndex); if (view == null) break; int viewSpan = (int) view.getPreferredSpan(axis); row.append(view); int breakWeight = view.getBreakWeight(axis, x, span); if (breakWeight >= View.ForcedBreakWeight) break; x += viewSpan; span -= viewSpan; offset += (view.getEndOffset() - view.getStartOffset()); } if (span < 0) { int flowStart = fv.getFlowStart(axis); int flowSpan = fv.getFlowSpan(axis); adjustRow(fv, rowIndex, flowSpan, flowStart); int rowViewCount = row.getViewCount(); offset = row.getView(rowViewCount - 1).getEndOffset(); } return offset != pos ? offset : -1; }
6,829
LogicalView(Element el) { super(el); children = new Vector(); }
LogicalView(Element el) { super(el); children = new Vector(); }
6,830
protected void loadChildren(ViewFactory vf) { if (layoutPool == null) { layoutPool = new LogicalView(getElement()); layoutPool.setParent(this); Element el = getElement(); int count = el.getElementCount(); for (int i = 0; i < count; ++i) { Element childEl = el.getElement(i); View childView = vf.create(childEl); layoutPool.append(childView); } } }
protected void loadChildren(ViewFactory vf) { if (layoutPool == null) { layoutPool = new LogicalView(getElement(), getAxis()); layoutPool.setParent(this); Element el = getElement(); int count = el.getElementCount(); for (int i = 0; i < count; ++i) { Element childEl = el.getElement(i); View childView = vf.create(childEl); layoutPool.append(childView); } } }
6,831
protected void loadChildren(ViewFactory vf) { if (layoutPool == null) { layoutPool = new LogicalView(getElement()); layoutPool.setParent(this); Element el = getElement(); int count = el.getElementCount(); for (int i = 0; i < count; ++i) { Element childEl = el.getElement(i); View childView = vf.create(childEl); layoutPool.append(childView); } } }
protected void loadChildren(ViewFactory vf) { if (layoutPool == null) { layoutPool = new LogicalView(getElement()); layoutPool.setParent(this); Element el = getElement(); int count = el.getElementCount(); for (int i = 0; i < count; ++i) { Element childEl = el.getElement(i); View childView = vf.create(childEl); layoutPool.append(childView); } } }
6,832
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); DerUtil.checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
6,833
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); DerUtil.checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
6,834
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); DerUtil.checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
6,835
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); DerUtil.checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
6,836
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger n, e; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); checkIsConstructed(derSPKI, "Wrong SubjectPublicKeyInfo field"); DERValue derAlgorithmID = der.read(); checkIsConstructed(derAlgorithmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); if (! (derOID.getValue() instanceof OID)) throw new InvalidParameterException("Wrong Algorithm field"); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(RSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue val = der.read(); if (! (val.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong SubjectPublicKey field"); byte[] spkBytes = ((BitString) val.getValue()).toByteArray(); der = new DERReader(spkBytes); val = der.read(); checkIsConstructed(derAlgorithmID, "Wrong subjectPublicKey field"); val = der.read(); checkIsBigInteger(val, "Wrong modulus field"); n = (BigInteger) val.getValue(); val = der.read(); DerUtil.checkIsBigInteger(val, "Wrong publicExponent field"); e = (BigInteger) val.getValue(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; } return new GnuRSAPublicKey(Registry.X509_ENCODING_ID, n, e); }
6,837
public final boolean writeClassInitialize(VmMethod method) { // Only for static methods (non <clinit>) if (method.isStatic() && !method.isInitializer()) { // Only when class is not initialize final VmType< ? > cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final int size = os.getMode().getSize(); // Save eax os.writePUSH(aax); // Do the is initialized test // Move method.declaringClass -> EAX final int typeOfs = getSharedStaticsOffset(method .getDeclaringClass()); os.writeMOV(size, aax, STATICS, typeOfs); // Test declaringClass.modifiers os.writeTEST(BITS32, aax, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(method.getMangledName() + "$$after-classinit"); os.writeJCC(afterInit, X86Constants.JNZ); // Call cls.initialize os.writePUSH(aax); invokeJavaMethod(entryPoints.getVmTypeInitialize()); os.setObjectRef(afterInit); // Restore eax os.writePOP(aax); return true; } } return false; }
public final boolean writeClassInitialize(VmMethod method) { // Only for static methods (non <clinit>) if (method.isStatic() && !method.isInitializer()) { // Only when class is not initialize final VmType< ? > cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final int size = os.getMode().getSize(); // Save eax os.writePUSH(aax); // Do the is initialized test // Move method.declaringClass -> EAX final int typeOfs = getSharedStaticsOffset(method .getDeclaringClass()); os.writeMOV(size, aax, STATICS, typeOfs); // Test declaringClass.modifiers os.writeTEST(BITS32, aax, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(method.getMangledName() + "$$after-classinit"); os.writeJCC(afterInit, X86Constants.JNZ); // Call cls.initialize os.writePUSH(aax); invokeJavaMethod(entryPoints.getVmTypeInitialize()); os.setObjectRef(afterInit); // Restore eax os.writePOP(aax); return true; } } return false; }
6,838
public final boolean writeClassInitialize(VmMethod method) { // Only for static methods (non <clinit>) if (method.isStatic() && !method.isInitializer()) { // Only when class is not initialize final VmType< ? > cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final int size = os.getMode().getSize(); // Save eax os.writePUSH(aax); // Do the is initialized test // Move method.declaringClass -> EAX final int typeOfs = getSharedStaticsOffset(method .getDeclaringClass()); os.writeMOV(size, aax, STATICS, typeOfs); // Test declaringClass.modifiers os.writeTEST(BITS32, aax, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(method.getMangledName() + "$$after-classinit"); os.writeJCC(afterInit, X86Constants.JNZ); // Call cls.initialize os.writePUSH(aax); invokeJavaMethod(entryPoints.getVmTypeInitialize()); os.setObjectRef(afterInit); // Restore eax os.writePOP(aax); return true; } } return false; }
public final boolean writeClassInitialize(VmMethod method) { // Only for static methods (non <clinit>) if (method.isStatic() && !method.isInitializer()) { // Only when class is not initialize final VmType< ? > cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final Label label = genLabel("$$class-init"); // Save eax os.writePUSH(aax); // Do the is initialized test // Move method.declaringClass -> EAX final int typeOfs = getSharedStaticsOffset(method .getDeclaringClass()); os.writeMOV(size, aax, STATICS, typeOfs); // Test declaringClass.modifiers os.writeTEST(BITS32, aax, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(method.getMangledName() + "$$after-classinit"); os.writeJCC(afterInit, X86Constants.JNZ); // Call cls.initialize os.writePUSH(aax); invokeJavaMethod(entryPoints.getVmTypeInitialize()); os.setObjectRef(afterInit); // Restore eax os.writePOP(aax); return true; } } return false; }
6,839
public final boolean writeClassInitialize(VmMethod method) { // Only for static methods (non <clinit>) if (method.isStatic() && !method.isInitializer()) { // Only when class is not initialize final VmType< ? > cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final int size = os.getMode().getSize(); // Save eax os.writePUSH(aax); // Do the is initialized test // Move method.declaringClass -> EAX final int typeOfs = getSharedStaticsOffset(method .getDeclaringClass()); os.writeMOV(size, aax, STATICS, typeOfs); // Test declaringClass.modifiers os.writeTEST(BITS32, aax, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(method.getMangledName() + "$$after-classinit"); os.writeJCC(afterInit, X86Constants.JNZ); // Call cls.initialize os.writePUSH(aax); invokeJavaMethod(entryPoints.getVmTypeInitialize()); os.setObjectRef(afterInit); // Restore eax os.writePOP(aax); return true; } } return false; }
public final boolean writeClassInitialize(VmMethod method) { // Only for static methods (non <clinit>) if (method.isStatic() && !method.isInitializer()) { // Only when class is not initialize final VmType< ? > cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final int size = os.getMode().getSize(); // Save eax os.writePUSH(aax); // Do the is initialized test // Move method.declaringClass -> EAX final int typeOfs = getSharedStaticsOffset(method .getDeclaringClass()); os.writeMOV(size, aax, STATICS, typeOfs); // Test declaringClass.modifiers os.writeTEST(BITS32, aax, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(method.getMangledName() + "$$after-classinit"); os.writeJCC(afterInit, X86Constants.JNZ); // Call cls.initialize os.writePUSH(aax); invokeJavaMethod(entryPoints.getVmTypeInitialize()); os.setObjectRef(afterInit); // Restore eax os.writePOP(aax); return true; } } return false; }
6,840
public final void writeLoadIsolatedStatics(Label curInstrLabel, String labelPrefix, GPR dst) { final int offset = entryPoints.getVmProcessorIsolatedStaticsTable() .getOffset(); if (os.isCode32()) { os.writeXOR(dst, dst); os.writePrefix(X86Constants.FS_PREFIX); os.writeMOV(INTSIZE, dst, dst, offset); } else { os.writeMOV(BITS64, dst, PROCESSOR64, offset); } }
public final void writeLoadIsolatedStatics(Label curInstrLabel, String labelPrefix, GPR dst) { final int offset = entryPoints.getVmProcessorIsolatedStaticsTable() .getOffset(); if (os.isCode32()) { Vm.getVm().getCounter("### load " + dst.getName()).inc(); os.writePrefix(X86Constants.FS_PREFIX); os.writeMOV(INTSIZE, dst, dst, offset); } else { os.writeMOV(BITS64, dst, PROCESSOR64, offset); } }
6,841
public final void writeLoadIsolatedStatics(Label curInstrLabel, String labelPrefix, GPR dst) { final int offset = entryPoints.getVmProcessorIsolatedStaticsTable() .getOffset(); if (os.isCode32()) { os.writeXOR(dst, dst); os.writePrefix(X86Constants.FS_PREFIX); os.writeMOV(INTSIZE, dst, dst, offset); } else { os.writeMOV(BITS64, dst, PROCESSOR64, offset); } }
public final void writeLoadIsolatedStatics(Label curInstrLabel, String labelPrefix, GPR dst) { final int offset = entryPoints.getVmProcessorIsolatedStaticsTable() .getOffset(); if (os.isCode32()) { os.writeXOR(dst, dst); os.writePrefix(X86Constants.FS_PREFIX); os.writeMOV(dst, offset); } else { os.writeMOV(BITS64, dst, PROCESSOR64, offset); } }
6,842
public void mousePressed(MouseEvent event) { // TODO: What should be done here, if anything? }
list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); public list.requestFocusInWindow(); void list.requestFocusInWindow(); mousePressed(MouseEvent list.requestFocusInWindow(); event) list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); { list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); // list.requestFocusInWindow(); TODO: list.requestFocusInWindow(); What list.requestFocusInWindow(); should list.requestFocusInWindow(); be list.requestFocusInWindow(); done list.requestFocusInWindow(); here, list.requestFocusInWindow(); if list.requestFocusInWindow(); anything? list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); list.requestFocusInWindow(); }
6,843
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
6,844
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
6,845
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
6,846
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
protected void installKeyboardActions() { InputMap focusInputMap = (InputMap) UIManager.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMapUIResource(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair for (int i = 0; i < keys.length; i++) { KeyStroke stroke = (KeyStroke) keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); parentActionMap.put(actionString, new ActionListenerProxy(action, actionString)); } // Register the new InputMap-ActionMap as the parents of the list's // InputMap and ActionMap parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); }
6,847
protected void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean isSel = list.isSelectedIndex(row); boolean hasFocus = (list.getLeadSelectionIndex() == row) && BasicListUI.this.list.hasFocus(); Component comp = rend.getListCellRendererComponent(list, data.getElementAt(row), 0, isSel, hasFocus); rendererPane.paintComponent(g, comp, list, bounds); }
protected void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend, ListModel data, ListSelectionModel sel, int lead) { boolean isSel = list.isSelectedIndex(row); boolean hasFocus = (list.getLeadSelectionIndex() == row) && BasicListUI.this.list.hasFocus(); Component comp = rend.getListCellRendererComponent(list, data.getElementAt(row), row, isSel, hasFocus); rendererPane.paintComponent(g, comp, list, bounds); }
6,848
protected void uninstallKeyboardActions() throws NotImplementedException { // TODO: Implement this properly. }
protected void uninstallKeyboardActions() { // TODO: Implement this properly. }
6,849
protected void uninstallKeyboardActions() throws NotImplementedException { // TODO: Implement this properly. }
InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); protected InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); void InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); uninstallKeyboardActions() InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); throws InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); NotImplementedException InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); { InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); // InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); TODO: InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); Implement InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); this InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); properly. InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); InputMap im = SwingUtilities.getUIInputMap(list, JComponent.WHEN_FOCUSED); if (im instanceof UIResource) SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, null); if (SwingUtilities.getUIActionMap(list) instanceof UIResource) SwingUtilities.replaceUIActionMap(list, null); }
6,850
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); // just something here to try. if (vector.size() >= 10) { vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); } // we have the lock and state we're seeking return vector.remove(0); } }
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); // just something here to try. /** * @todo here is the throttling code to look at * * just something here to try. OK it works but we need to be a little * more intelligent with the throttling. */ if (vector.size() >= 20) { vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); vector.remove(0); } // we have the lock and state we're seeking return vector.remove(0); } }
6,851
public AccessibleStateSet getAccessibleStateSet() { // TODO: What state shoiuld be returned here? return new AccessibleStateSet(); }
public AccessibleStateSet getAccessibleStateSet() { // TODO: What state shoiuld be returned here? AccessibleStateSet state = new AccessibleStateSet(); Rectangle visibleRect = getVisibleRect(); Rectangle cellRect = getCellRect(row, column, false); if (visibleRect.intersects(cellRect)) state.add(AccessibleState.SHOWING); if (isCellSelected(row, column)) state.add(AccessibleState.SELECTED); if (row == getSelectedRow() && column == getSelectedColumn()) state.add(AccessibleState.ACTIVE); state.add(AccessibleState.TRANSIENT); return state; }
6,854
protected AccessibleJTable() { getModel().addTableModelListener(this); getSelectionModel().addListSelectionListener(this); getColumnModel().addColumnModelListener(this); getCellEditor().addCellEditorListener(this); }
protected AccessibleJTable() { getModel().addTableModelListener(this); getSelectionModel().addListSelectionListener(this); getColumnModel().addColumnModelListener(this); lastSelectedRow = getSelectedRow(); lastSelectedColumn = getSelectedColumn(); TableCellEditor editor = getCellEditor(); if (editor != null) editor.addCellEditorListener(this); }
6,855
public void addAccessibleSelection(int i) { // TODO Auto-generated method stub }
int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); public void addAccessibleSelection(int i)int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); {int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); // TODO Auto-generated method stubint r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); changeSelection(r, c, true, false); }
6,856
public void clearAccessibleSelection() { // TODO Auto-generated method stub }
clearSelection(); clearSelection(); public void clearAccessibleSelection()clearSelection(); clearSelection(); {clearSelection(); clearSelection(); clearSelection(); // TODO Auto-generated method stubclearSelection(); clearSelection(); clearSelection(); clearSelection(); clearSelection(); }
6,857
public void columnAdded(TableColumnModelEvent event) { // TODO Auto-generated method stub }
firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); public void columnAdded(TableColumnModelEvent event)firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); {firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); // TODO Auto-generated method stubfirePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); }
6,858
public void columnMarginChanged(ChangeEvent event) { // TODO Auto-generated method stub }
firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); public void columnMarginChanged(ChangeEvent event)firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); {firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); // TODO Auto-generated method stubfirePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); }
6,859
public void columnMoved(TableColumnModelEvent event) { // TODO Auto-generated method stub }
firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); public void columnMoved(TableColumnModelEvent event)firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); {firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); // TODO Auto-generated method stubfirePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getFromIndex()); handleColumnChange(AccessibleTableModelChange.INSERT, event.getFromIndex(), event.getToIndex()); }
6,860
public void columnRemoved(TableColumnModelEvent event) { // TODO Auto-generated method stub }
firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); public void columnRemoved(TableColumnModelEvent event)firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); {firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); // TODO Auto-generated method stubfirePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); handleColumnChange(AccessibleTableModelChange.DELETE, event.getFromIndex(), event.getToIndex()); }
6,861
public void columnSelectionChanged(ListSelectionEvent event) { // TODO Auto-generated method stub }
public void columnSelectionChanged(ListSelectionEvent event) { // TODO Auto-generated method stub }
6,862
public void editingCanceled(ChangeEvent event) { // TODO Auto-generated method stub }
public void editingCanceled(ChangeEvent event) { // TODO Auto-generated method stub }
6,863
public void editingStopped(ChangeEvent event) { // TODO Auto-generated method stub }
firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); public void editingStopped(ChangeEvent event)firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); {firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); // TODO Auto-generated method stubfirePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null); }
6,864
public Accessible getAccessibleAt(int r, int c) { // TODO Auto-generated method stub return null; }
public Accessible getAccessibleAt(int r, int c) { // TODO Auto-generated method stub return getAccessibleChild(r * getAccessibleColumnCount() + c); }
6,865
public Accessible getAccessibleCaption() { // TODO Auto-generated method stub return null; }
public Accessible getAccessibleCaption() { // TODO Auto-generated method stub return caption; }
6,866
public int getAccessibleColumn(int index) { // TODO Auto-generated method stub return 0; }
public int getAccessibleColumn(int index) { // TODO Auto-generated method stub return getAccessibleColumnAtIndex(index); }
6,867
public int getAccessibleColumnCount() { // TODO Auto-generated method stub return 0; }
public int getAccessibleColumnCount() { // TODO Auto-generated method stub return getColumnCount(); }
6,868
public Accessible getAccessibleColumnDescription(int c) { // TODO Auto-generated method stub return null; }
public Accessible getAccessibleColumnDescription(int c) { // TODO Auto-generated method stub Accessible descr = null; if (columnDescriptions != null) descr = columnDescriptions[c]; return descr; }
6,869
public int getAccessibleColumnExtentAt(int r, int c) { // TODO Auto-generated method stub return 0; }
public int getAccessibleColumnExtentAt(int r, int c) { // TODO Auto-generated method stub return 1; }
6,870
public AccessibleTable getAccessibleColumnHeader() { // TODO Auto-generated method stub return null; }
public AccessibleTable getAccessibleColumnHeader() { // TODO Auto-generated method stub JTableHeader h = getTableHeader(); AccessibleTable header = null; if (h != null) header = new AccessibleTableHeader(h); return header; }
6,871
public int getAccessibleIndex(int r, int c) { // TODO Auto-generated method stub return 0; }
public int getAccessibleIndex(int r, int c) { // TODO Auto-generated method stub return getAccessibleIndexAt(r, c); }
6,872
public int getAccessibleRow(int index) { // TODO Auto-generated method stub return 0; }
public int getAccessibleRow(int index) { // TODO Auto-generated method stub return getAccessibleRowAtIndex(index); }
6,873
public int getAccessibleRowCount() { // TODO Auto-generated method stub return 0; }
public int getAccessibleRowCount() { // TODO Auto-generated method stub return getRowCount(); }
6,874
public Accessible getAccessibleRowDescription(int r) { // TODO Auto-generated method stub return null; }
public Accessible getAccessibleRowDescription(int r) { // TODO Auto-generated method stub Accessible descr = null; if (rowDescriptions != null) descr = rowDescriptions[r]; return descr; }
6,875
public int getAccessibleRowExtentAt(int r, int c) { // TODO Auto-generated method stub return 0; }
public int getAccessibleRowExtentAt(int r, int c) { // TODO Auto-generated method stub return 1; }
6,876
public AccessibleTable getAccessibleRowHeader() { // TODO Auto-generated method stub return null; }
public AccessibleTable getAccessibleRowHeader() { // TODO Auto-generated method stub return null; }
6,877
public Accessible getAccessibleSelection(int i) { // TODO Auto-generated method stub return null; }
public Accessible getAccessibleSelection(int i) { // TODO Auto-generated method stub Accessible found = null; int[] selectedRows = getSelectedRows(); int[] selectedColumns = getSelectedColumns(); int numCols = getColumnCount(); int numRows = getRowCount(); if (getRowSelectionAllowed() && getColumnSelectionAllowed()) { int current = -1; int newIndex = current; int lastSelectedRow = -1; for (int j = 0; i < selectedRows.length; i++) { int selectedRow = selectedRows[j]; int r = -1; int ci = -1; for (r = lastSelectedRow + 1; r < selectedRow && current < i; r++) { for (ci = 0; ci < selectedColumns.length && current < i; ci++) { current++; } } if (current == i) { found = getAccessibleChild(r * numCols + selectedColumns[ci]); break; } if (current < i && current + numCols >= i) { found = getAccessibleChild(r * numCols + (i - current)); break; } current += numCols; } if (found == null) { int r = 0; int ci = 0; for (r = lastSelectedRow + 1; r < numRows && current < i; r++) { for (ci = 0; ci < selectedColumns.length && current < i; ci++) { current++; } } if (current == i) { found = getAccessibleChild(r * numCols + selectedColumns[ci]); } } } else if (getRowSelectionAllowed()) { int c = i % numCols; int r = selectedRows[i / numCols]; found = getAccessibleChild(r * numCols + c); } else if (getRowSelectionAllowed()) { int numSelectedColumns = selectedColumns.length; int c = selectedColumns[i % numSelectedColumns]; int r = i / numSelectedColumns; found = getAccessibleChild(r * numCols + c); } return found; }
6,878
public Accessible getAccessibleSummary() { // TODO Auto-generated method stub return null; }
public Accessible getAccessibleSummary() { // TODO Auto-generated method stub return summary; }
6,879
public int[] getSelectedAccessibleColumns() { // TODO Auto-generated method stub return null; }
public int[] getSelectedAccessibleColumns() { // TODO Auto-generated method stub return getSelectedColumns(); }
6,880
public int[] getSelectedAccessibleRows() { // TODO Auto-generated method stub return null; }
public int[] getSelectedAccessibleRows() { // TODO Auto-generated method stub return getSelectedRows(); }
6,881
public boolean isAccessibleChildSelected(int i) { // TODO Auto-generated method stub return false; }
public boolean isAccessibleChildSelected(int i) { // TODO Auto-generated method stub int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); return isCellSelected(r, c); }
6,882
public boolean isAccessibleColumnSelected(int c) { // TODO Auto-generated method stub return false; }
public boolean isAccessibleColumnSelected(int c) { // TODO Auto-generated method stub return isColumnSelected(c); }
6,883
public boolean isAccessibleRowSelected(int r) { // TODO Auto-generated method stub return false; }
public boolean isAccessibleRowSelected(int r) { // TODO Auto-generated method stub return isRowSelected(r); }
6,884
public boolean isAccessibleSelected(int r, int c) { // TODO Auto-generated method stub return false; }
public boolean isAccessibleSelected(int r, int c) { // TODO Auto-generated method stub return isCellSelected(r, c); }
6,885
public void removeAccessibleSelection(int i) { // TODO Auto-generated method stub }
if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } public void removeAccessibleSelection(int i)if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } {if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } // TODO Auto-generated method stubif (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } if (! getRowSelectionAllowed() && ! getColumnSelectionAllowed()) { int r = getAccessibleRowAtIndex(i); int c = getAccessibleColumnAtIndex(i); removeRowSelectionInterval(r, r); removeColumnSelectionInterval(c, c); } }
6,886
public void selectAllAccessibleSelection() { // TODO Auto-generated method stub }
selectAll(); selectAll(); public void selectAllAccessibleSelection()selectAll(); selectAll(); {selectAll(); selectAll(); selectAll(); // TODO Auto-generated method stubselectAll(); selectAll(); selectAll(); selectAll(); selectAll(); }
6,887
public void setAccessibleCaption(Accessible caption) { // TODO Auto-generated method stub }
public void setAccessibleCaption(Accessible c) { // TODO Auto-generated method stub }
6,888
public void setAccessibleCaption(Accessible caption) { // TODO Auto-generated method stub }
caption = c; caption = c; public void setAccessibleCaption(Accessible caption)caption = c; caption = c; {caption = c; caption = c; caption = c; // TODO Auto-generated method stubcaption = c; caption = c; caption = c; caption = c; caption = c; }
6,889
public void setAccessibleColumnDescription(int c, Accessible description) { // TODO Auto-generated method stub }
if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; public void setAccessibleColumnDescription(int c, Accessible description)if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; {if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; // TODO Auto-generated method stubif (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; if (columnDescriptions == null) columnDescriptions = new Accessible[getAccessibleRowCount()]; columnDescriptions[c] = description; }
6,890
public void setAccessibleColumnHeader(AccessibleTable header) { // TODO Auto-generated method stub }
public void setAccessibleColumnHeader(AccessibleTable header) { // TODO Auto-generated method stub }
6,891
public void setAccessibleRowDescription(int r, Accessible description) { // TODO Auto-generated method stub }
if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; public void setAccessibleRowDescription(int r, Accessible description)if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; {if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; // TODO Auto-generated method stubif (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; if (rowDescriptions == null) rowDescriptions = new Accessible[getAccessibleRowCount()]; rowDescriptions[r] = description; }
6,892
public void setAccessibleRowHeader(AccessibleTable header) { // TODO Auto-generated method stub }
public void setAccessibleRowHeader(AccessibleTable header) { // TODO Auto-generated method stub }
6,893
public void setAccessibleSummary(Accessible summary) { // TODO Auto-generated method stub }
public void setAccessibleSummary(Accessible s) { // TODO Auto-generated method stub }
6,894
public void setAccessibleSummary(Accessible summary) { // TODO Auto-generated method stub }
summary = s; summary = s; public void setAccessibleSummary(Accessible summary)summary = s; summary = s; {summary = s; summary = s; summary = s; // TODO Auto-generated method stubsummary = s; summary = s; summary = s; summary = s; summary = s; }
6,895
public void tableRowsDeleted(TableModelEvent event) { // TODO: What to do here, if anything? This might be a hook method for // subclasses... }
handleRowChange(event); handleRowChange(event); public void tableRowsDeleted(TableModelEvent event)handleRowChange(event); handleRowChange(event); {handleRowChange(event); handleRowChange(event); handleRowChange(event); // TODO: What to do here, if anything? This might be a hook method forhandleRowChange(event); handleRowChange(event); handleRowChange(event); // subclasses...handleRowChange(event); handleRowChange(event); }
6,896
public void tableRowsInserted(TableModelEvent event) { // TODO: What to do here, if anything? This might be a hook method for // subclasses... }
handleRowChange(event); handleRowChange(event); public void tableRowsInserted(TableModelEvent event)handleRowChange(event); handleRowChange(event); {handleRowChange(event); handleRowChange(event); handleRowChange(event); // TODO: What to do here, if anything? This might be a hook method forhandleRowChange(event); handleRowChange(event); handleRowChange(event); // subclasses...handleRowChange(event); handleRowChange(event); }
6,897
public void valueChanged(ListSelectionEvent event) { // TODO Auto-generated method stub }
firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } public void valueChanged(ListSelectionEvent event)firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } {firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } // TODO Auto-generated method stubfirePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, Boolean.FALSE, Boolean.TRUE); int r = getSelectedRow(); int c = getSelectedColumn(); if (r != lastSelectedRow || c != lastSelectedColumn) { Accessible o = getAccessibleAt(lastSelectedRow, lastSelectedColumn); Accessible n = getAccessibleAt(r, c); firePropertyChange(AccessibleContext .ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, o, n); lastSelectedRow = r; lastSelectedColumn = c; } }
6,898
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value instanceof Icon) { Icon iconValue = (Icon) value; setIcon(iconValue); setText(""); } return this; }
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value instanceof Icon) { Icon iconValue = (Icon) value; setIcon(iconValue); } return this; }
6,899
public void columnSelectionChanged (ListSelectionEvent event) { // Does not make sense for the table with the single column. if (getColumnCount() < 2) return; int x0 = 0; int idx0 = event.getFirstIndex(); int idxn = event.getLastIndex(); int i; for (i = 0; i < idx0; i++) x0 += columnModel.getColumn(i).getWidth(); int xn = x0; for (i = idx0; i <= idxn; i++) xn += columnModel.getColumn(i).getWidth(); repaint(x0, 0, xn-x0, getHeight()); }
public void columnSelectionChanged (ListSelectionEvent event) { // Does not make sense for the table with the single column. if (getColumnCount() < 2) return; int x0 = 0; int idx0 = event.getFirstIndex(); int idxn = event.getLastIndex(); int i; for (i = 0; i < idx0; i++) x0 += columnModel.getColumn(i).getWidth(); int xn = x0; for (i = idx0; i <= idxn; i++) xn += columnModel.getColumn(i).getWidth(); repaint(x0, 0, xn-x0, getHeight()); }
6,902
public void columnSelectionChanged (ListSelectionEvent event) { // Does not make sense for the table with the single column. if (getColumnCount() < 2) return; int x0 = 0; int idx0 = event.getFirstIndex(); int idxn = event.getLastIndex(); int i; for (i = 0; i < idx0; i++) x0 += columnModel.getColumn(i).getWidth(); int xn = x0; for (i = idx0; i <= idxn; i++) xn += columnModel.getColumn(i).getWidth(); repaint(x0, 0, xn-x0, getHeight()); }
public void columnSelectionChanged (ListSelectionEvent event) { // Does not make sense for the table with the single column. if (getColumnCount() < 2) return; int x0 = 0; int idx0 = event.getFirstIndex(); int idxn = event.getLastIndex(); int i; for (i = 0; i < idx0; i++) x0 += columnModel.getColumn(i).getWidth(); int xn = x0; for (i = idx0; i <= idxn; i++) xn += columnModel.getColumn(i).getWidth(); repaint(x0, 0, xn-x0, getHeight()); }
6,903
protected void createDefaultEditors() { JCheckBox box = new BooleanCellRenderer().getCheckBox(); setDefaultEditor(Boolean.class, new DefaultCellEditor(box)); }
protected void createDefaultEditors() { JCheckBox box = new BooleanCellRenderer().getCheckBox(); box.setBorder(BorderFactory.createLineBorder(getGridColor(), 2)); box.setBorderPainted(true); booleanInvertingEditor = new DefaultCellEditor(box); setDefaultEditor(Boolean.class, booleanInvertingEditor); }
6,904
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) { TableColumn col = columnModel.getColumn(i); int p = col.getPreferredWidth(); prefSum += p; if (resizingColumn == col) rCol = i; } int spill = getWidth() - prefSum; if (resizingColumn != null) { TableColumn col; TableColumn [] cols; switch (getAutoResizeMode()) { case AUTO_RESIZE_LAST_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_NEXT_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_ALL_COLUMNS: cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpillResizing(cols, spill, resizingColumn); break; case AUTO_RESIZE_SUBSEQUENT_COLUMNS: // Subtract the width of the non-resized columns from the spill. int w = 0; int wp = 0; TableColumn column; for (int i = 0; i < rCol; i++) { column = columnModel.getColumn(i); w += column.getWidth(); wp+= column.getPreferredWidth(); } // The number of columns right from the column being resized. int n = ncols-rCol-1; if (n>0) { // If there are any columns on the right sied to resize. spill = (getWidth()-w) - (prefSum-wp); int average = spill / n; // For all columns right from the column being resized: for (int i = rCol+1; i < ncols; i++) { column = columnModel.getColumn(i); column.setWidth(column.getPreferredWidth() + average); } } resizingColumn.setWidth(resizingColumn.getPreferredWidth()); break; case AUTO_RESIZE_OFF: default: int prefWidth = resizingColumn.getPreferredWidth(); resizingColumn.setWidth(prefWidth); } } else { TableColumn [] cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); } if (editorComp!=null) moveToCellBeingEdited(editorComp); // Repaint fixes the invalid view after the first keystroke if the cell // editing is started immediately after the program start or cell // resizing. repaint(); if (tableHeader!=null) tableHeader.repaint(); }
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) { TableColumn col = columnModel.getColumn(i); int p = col.getPreferredWidth(); prefSum += p; if (resizingColumn == col) rCol = i; } int spill = getWidth() - prefSum; if (resizingColumn != null) { TableColumn col; TableColumn [] cols; switch (getAutoResizeMode()) { case AUTO_RESIZE_LAST_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_NEXT_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_ALL_COLUMNS: cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpillResizing(cols, spill, resizingColumn); break; case AUTO_RESIZE_SUBSEQUENT_COLUMNS: // Subtract the width of the non-resized columns from the spill. int w = 0; int wp = 0; TableColumn column; for (int i = 0; i < rCol; i++) { column = columnModel.getColumn(i); w += column.getWidth(); wp+= column.getPreferredWidth(); } // The number of columns right from the column being resized. int n = ncols-rCol-1; if (n>0) { // If there are any columns on the right sied to resize. spill = (getWidth()-w) - (prefSum-wp); int average = spill / n; // For all columns right from the column being resized: for (int i = rCol+1; i < ncols; i++) { column = columnModel.getColumn(i); column.setWidth(column.getPreferredWidth() + average); } } resizingColumn.setWidth(resizingColumn.getPreferredWidth()); break; case AUTO_RESIZE_OFF: default: int prefWidth = resizingColumn.getPreferredWidth(); resizingColumn.setWidth(prefWidth); } } else { TableColumn [] cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); } if (editorComp!=null) moveToCellBeingEdited(editorComp); // Repaint fixes the invalid view after the first keystroke if the cell // editing is started immediately after the program start or cell // resizing. repaint(); if (tableHeader!=null) tableHeader.repaint(); }
6,905
public boolean editCellAt (int row, int column) { // Complete the previous editing session, if still active. if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column; setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); // Remove the previous editor components, if present. Only one // editor component at time is allowed in the table. removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow(); return true; }
public boolean editCellAt(int row, int column) { // Complete the previous editing session, if still active. if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column; setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); // Remove the previous editor components, if present. Only one // editor component at time is allowed in the table. removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow(); return true; }
6,906
public boolean editCellAt (int row, int column) { // Complete the previous editing session, if still active. if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column; setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); // Remove the previous editor components, if present. Only one // editor component at time is allowed in the table. removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow(); return true; }
public boolean editCellAt (int row, int column) { // Complete the previous editing session, if still active. if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column; setCellEditor(editor); editorComp = prepareEditor(cellEditor, row, column); // Remove the previous editor components, if present. Only one // editor component at time is allowed in the table. removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow(); return true; }
6,907
public boolean editCellAt (int row, int column) { // Complete the previous editing session, if still active. if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column; setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); // Remove the previous editor components, if present. Only one // editor component at time is allowed in the table. removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow(); return true; }
public boolean editCellAt (int row, int column) { // Complete the previous editing session, if still active. if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column; setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); // Remove the previous editor components, if present. Only one // editor component at time is allowed in the table. removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow(); return editor.shouldSelectCell(null); } }
6,908
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
6,910
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
6,911
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
6,912
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
6,913
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
public Rectangle getCellRect(int row, int column, boolean includeSpacing) { int height = getRowHeight(row); int width = columnModel.getColumn(column).getWidth(); int x_gap = columnModel.getColumnMargin(); int y_gap = rowMargin; column = Math.max(0, Math.min(column, getColumnCount() - 1)); row = Math.max(0, Math.min(row, getRowCount() - 1)); int x = 0; int y = (height + y_gap) * row; for (int i = 0; i < column; ++i) x += columnModel.getColumn(i).getWidth(); Rectangle rect = new Rectangle(); if (includeSpacing) rect.setBounds(x, y, width, height +y_gap); else rect.setBounds(x, y, width - x_gap, height); return rect; }
6,914
protected void initializeLocalVars() { setTableHeader(createDefaultTableHeader()); if (autoCreateColumnsFromModel) createDefaultColumnsFromModel(); this.columnModel.addColumnModelListener(this); this.defaultRenderersByColumnClass = new Hashtable(); createDefaultRenderers(); this.defaultEditorsByColumnClass = new Hashtable(); createDefaultEditors(); this.autoResizeMode = AUTO_RESIZE_SUBSEQUENT_COLUMNS; this.rowHeight = 16; this.rowMargin = 1; this.rowSelectionAllowed = true; // this.accessibleContext = new AccessibleJTable(); this.cellEditor = null; // COMPAT: Both Sun and IBM have drag enabled this.dragEnabled = true; this.preferredViewportSize = new Dimension(450,400); this.showHorizontalLines = true; this.showVerticalLines = true; this.editingColumn = -1; this.editingRow = -1; }
protected void initializeLocalVars() { setTableHeader(createDefaultTableHeader()); if (autoCreateColumnsFromModel) createDefaultColumnsFromModel(); this.columnModel.addColumnModelListener(this); this.defaultRenderersByColumnClass = new Hashtable(); createDefaultRenderers(); this.defaultEditorsByColumnClass = new Hashtable(); createDefaultEditors(); this.autoResizeMode = AUTO_RESIZE_SUBSEQUENT_COLUMNS; this.rowHeight = 16; this.rowMargin = 1; this.rowSelectionAllowed = true; // this.accessibleContext = new AccessibleJTable(); this.cellEditor = null; // COMPAT: Both Sun and IBM have drag enabled this.dragEnabled = true; this.preferredViewportSize = new Dimension(450,400); this.showHorizontalLines = true; this.showVerticalLines = true; this.editingColumn = -1; this.editingRow = -1; }
6,915
protected void initializeLocalVars() { setTableHeader(createDefaultTableHeader()); if (autoCreateColumnsFromModel) createDefaultColumnsFromModel(); this.columnModel.addColumnModelListener(this); this.defaultRenderersByColumnClass = new Hashtable(); createDefaultRenderers(); this.defaultEditorsByColumnClass = new Hashtable(); createDefaultEditors(); this.autoResizeMode = AUTO_RESIZE_SUBSEQUENT_COLUMNS; this.rowHeight = 16; this.rowMargin = 1; this.rowSelectionAllowed = true; // this.accessibleContext = new AccessibleJTable(); this.cellEditor = null; // COMPAT: Both Sun and IBM have drag enabled this.dragEnabled = true; this.preferredViewportSize = new Dimension(450,400); this.showHorizontalLines = true; this.showVerticalLines = true; this.editingColumn = -1; this.editingRow = -1; }
protected void initializeLocalVars() { setTableHeader(createDefaultTableHeader()); if (autoCreateColumnsFromModel) createDefaultColumnsFromModel(); this.columnModel.addColumnModelListener(this); this.defaultRenderersByColumnClass = new Hashtable(); createDefaultRenderers(); this.defaultEditorsByColumnClass = new Hashtable(); createDefaultEditors(); this.autoResizeMode = AUTO_RESIZE_SUBSEQUENT_COLUMNS; setRowHeight(16); this.rowMargin = 1; this.rowSelectionAllowed = true; // this.accessibleContext = new AccessibleJTable(); this.cellEditor = null; // COMPAT: Both Sun and IBM have drag enabled this.dragEnabled = true; this.preferredViewportSize = new Dimension(450,400); this.showHorizontalLines = true; this.showVerticalLines = true; this.editingColumn = -1; this.editingRow = -1; }
6,916
public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { boolean rowSelAllowed = getRowSelectionAllowed(); boolean colSelAllowed = getColumnSelectionAllowed(); boolean isSel = false; if (rowSelAllowed && colSelAllowed || !rowSelAllowed && !colSelAllowed) isSel = isCellSelected(row, column); else isSel = isRowSelected(row) && getRowSelectionAllowed() || isColumnSelected(column) && getColumnSelectionAllowed(); // Determine the focused cell. The focused cell is the cell at the // leadSelectionIndices of the row and column selection model. ListSelectionModel rowSel = getSelectionModel(); ListSelectionModel colSel = getColumnModel().getSelectionModel(); boolean hasFocus = hasFocus() && isEnabled() && rowSel.getLeadSelectionIndex() == row && colSel.getLeadSelectionIndex() == column; return renderer.getTableCellRendererComponent(this, dataModel.getValueAt(row, convertColumnIndexToModel(column)), isSel, hasFocus, row, column); }
publicComponentprepareRenderer(TableCellRendererrenderer,introw,intcolumn){booleanrowSelAllowed=getRowSelectionAllowed();booleancolSelAllowed=getColumnSelectionAllowed();booleanisSel=false;if(rowSelAllowed&&colSelAllowed||!rowSelAllowed&&!colSelAllowed)isSel=isCellSelected(row,column);elseisSel=isRowSelected(row)&&getRowSelectionAllowed()||isColumnSelected(column)&&getColumnSelectionAllowed();//Determinethefocusedcell.Thefocusedcellisthecellatthe//leadSelectionIndicesoftherowandcolumnselectionmodel.ListSelectionModelrowSel=getSelectionModel();ListSelectionModelcolSel=getColumnModel().getSelectionModel();booleanhasFocus=hasFocus()&&isEnabled()&&rowSel.getLeadSelectionIndex()==row&&colSel.getLeadSelectionIndex()==column;returnrenderer.getTableCellRendererComponent(this,dataModel.getValueAt(row, convertColumnIndexToModel(column)),isSel,hasFocus,row,column);}
6,917
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight() + getRowMargin(); int y = point.y; int r = y / height; if (r < 0 || r >= nrows) return -1; else return r; } else return -1; }
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int r; int y = point.y; int r = y / height; if (r < 0 || r >= nrows) return -1; else return r; } else return -1; }
6,918
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight() + getRowMargin(); int y = point.y; int r = y / height; if (r < 0 || r >= nrows) return -1; else return r; } else return -1; }
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight() + getRowMargin(); int y = point.y; if (r < 0 || r >= nrows) return -1; else return r; } else return -1; }
6,919
public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); repaint(getCellRect(row, column, true)); }
public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); repaint(getCellRect(row, column, true)); }
6,924
public void valueChanged (ListSelectionEvent event) { // Does not make sense for the table with the single row. if (getRowCount() < 2) return; int y_gap = rowMargin; int y0 = (getRowHeight() + y_gap) * (event.getFirstIndex()); int yn = (getRowHeight() + y_gap) * (event.getLastIndex()+1); repaint(0, y0, getWidth(), yn-y0); }
public void valueChanged (ListSelectionEvent event) { // Does not make sense for the table with the single row. if (getRowCount() < 2) return; int y_gap = rowMargin; int y0 = (getRowHeight() + y_gap) * (event.getFirstIndex()); int yn = (getRowHeight() + y_gap) * (event.getLastIndex()+1); repaint(0, y0, getWidth(), yn-y0); }
6,926
public void valueChanged (ListSelectionEvent event) { // Does not make sense for the table with the single row. if (getRowCount() < 2) return; int y_gap = rowMargin; int y0 = (getRowHeight() + y_gap) * (event.getFirstIndex()); int yn = (getRowHeight() + y_gap) * (event.getLastIndex()+1); repaint(0, y0, getWidth(), yn-y0); }
public void valueChanged (ListSelectionEvent event) { // Does not make sense for the table with the single row. if (getRowCount() < 2) return; int y_gap = rowMargin; int y0 = (getRowHeight() + y_gap) * (event.getFirstIndex()); int yn = (getRowHeight() + y_gap) * (event.getLastIndex()+1); repaint(0, y0, getWidth(), yn-y0); }
6,927
public void dumpInfo() { System.out.println("frame.size: " + getSize()); System.out.println("frame.insets: " + getInsets()); System.out.println("frame.peer.insets: " + ((FramePeer)getPeer()).getInsets()); System.out.println("frame.cp.bounds: " + getContentPane().getBounds()); System.out.println("north.bounds " + north.getBounds()); System.out.println("south.bounds " + south.getBounds()); }
public void dumpInfo() { System.out.println("frame.size: " + getSize()); System.out.println("frame.insets: " + getInsets()); System.out.println("frame.peer.insets: " + ((FramePeer)getPeer()).getInsets()); System.out.println("frame.cp.bounds: " + getContentPane().getBounds()); System.out.println("north.bounds " + north.getBounds()); System.out.println("south.bounds " + south.getBounds()); }
6,929
public InterruptedException() { super(); }
public InterruptedException() { super(); }
6,930
public boolean hasNext() { int size = axisOrderList.size(); for (int i = 0; i < size ; i++) { AxisInterface axis = (AxisInterface) axisOrderList.get(i); int index = ((Integer) locations.get(axis)).intValue(); if (index < axis.getLength()-1) { return true; } } return false; }
public boolean hasNext() { int size = axisOrderList.size(); for (int i = 0; i < size ; i++) { AxisInterface axis = (AxisInterface) axisOrderList.get(i); int index = ((Integer) locations.get(axis)).intValue(); if (index < axis.getLength()-1) { return true; } } return false; }
6,935