rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public Dimension getViewportSize() { Dimension viewsize = getSize(); Insets insets = getInsets(); viewsize.width = viewsize.width - (insets.left + insets.right); viewsize.height = viewsize.height - (insets.top + insets.bottom); | public Dimension getViewportSize () { Dimension viewsize = getSize (); Insets insets = getInsets (); | public Dimension getViewportSize() { Dimension viewsize = getSize(); Insets insets = getInsets(); viewsize.width = viewsize.width - (insets.left + insets.right); viewsize.height = viewsize.height - (insets.top + insets.bottom); ScrollPaneAdjustable v = (ScrollPaneAdjustable) getVAdjustable(); ScrollPaneAdjustabl... |
ScrollPaneAdjustable v = (ScrollPaneAdjustable) getVAdjustable(); ScrollPaneAdjustable h = (ScrollPaneAdjustable) getHAdjustable(); | viewsize.width -= (insets.left + insets.right); viewsize.height -= (insets.top + insets.bottom); | public Dimension getViewportSize() { Dimension viewsize = getSize(); Insets insets = getInsets(); viewsize.width = viewsize.width - (insets.left + insets.right); viewsize.height = viewsize.height - (insets.top + insets.bottom); ScrollPaneAdjustable v = (ScrollPaneAdjustable) getVAdjustable(); ScrollPaneAdjustabl... |
if ((v != null) && v.isVisible()) viewsize.width = viewsize.width - v.getSize().width; if ((h != null) && h.isVisible()) viewsize.height = viewsize.height - v.getSize().height; | Component[] list = getComponents(); if ((list == null) || (list.length <= 0)) return viewsize; | public Dimension getViewportSize() { Dimension viewsize = getSize(); Insets insets = getInsets(); viewsize.width = viewsize.width - (insets.left + insets.right); viewsize.height = viewsize.height - (insets.top + insets.bottom); ScrollPaneAdjustable v = (ScrollPaneAdjustable) getVAdjustable(); ScrollPaneAdjustabl... |
return (viewsize); | Dimension dim = list[0].getPreferredSize(); if (dim.width <= 0 && dim.height <= 0) return viewsize; int vScrollbarWidth = getVScrollbarWidth (); int hScrollbarHeight = getHScrollbarHeight (); if (scrollbarDisplayPolicy == SCROLLBARS_ALWAYS) { viewsize.width -= vScrollbarWidth; viewsize.height -= hScrollbarHeight; re... | public Dimension getViewportSize() { Dimension viewsize = getSize(); Insets insets = getInsets(); viewsize.width = viewsize.width - (insets.left + insets.right); viewsize.height = viewsize.height - (insets.top + insets.bottom); ScrollPaneAdjustable v = (ScrollPaneAdjustable) getVAdjustable(); ScrollPaneAdjustabl... |
if (scrollbarDisplayPolicy == SCROLLBARS_NEVER) return viewsize; boolean mayNeedVertical = false; boolean mayNeedHorizontal = false; boolean needVertical = false; boolean needHorizontal = false; if (dim.height > viewsize.height) needVertical = true; else if (dim.height > (viewsize.height - hScrollbarHeight)) ... | public Dimension getViewportSize() { Dimension viewsize = getSize(); Insets insets = getInsets(); viewsize.width = viewsize.width - (insets.left + insets.right); viewsize.height = viewsize.height - (insets.top + insets.bottom); ScrollPaneAdjustable v = (ScrollPaneAdjustable) getVAdjustable(); ScrollPaneAdjustabl... | |
public void layout() { doLayout(); | layout() { Component[] list = getComponents (); if ((list != null) && (list.length > 0)) { Dimension dim = list[0].getPreferredSize (); Dimension vp = getViewportSize (); if (dim.width < vp.width) dim.width = vp.width; if (dim.height < vp.height) dim.height = vp.height; ScrollPanePeer peer = (ScrollPanePeer) getPeer... | public void layout() { doLayout(); } |
} | public void layout() { doLayout(); } | |
public String paramString() { return (getClass().getName()); } | paramString() { return(getClass().getName()); } | public String paramString() { return (getClass().getName()); } |
public void printComponents(Graphics graphics) { | printComponents(Graphics graphics) { | public void printComponents(Graphics graphics) { super.printComponents(graphics); } |
public void removeNotify() { if (hAdjustable != null) hAdjustable.removeNotify(); if (vAdjustable != null) vAdjustable.removeNotify(); | removeNotify() { | public void removeNotify() { if (hAdjustable != null) hAdjustable.removeNotify(); if (vAdjustable != null) vAdjustable.removeNotify(); super.removeNotify(); } |
public final void setLayout(LayoutManager layoutManager) { | setLayout(LayoutManager layoutManager) { | public final void setLayout(LayoutManager layoutManager) { return; } |
public void setScrollPosition(Point scrollPosition) throws IllegalArgumentException { | setScrollPosition(Point scrollPosition) throws IllegalArgumentException { | public void setScrollPosition(Point scrollPosition) throws IllegalArgumentException { setScrollPosition(scrollPosition.x, scrollPosition.y); } |
ScrollPaneAdjustable(int orientation) { super(orientation); } | ScrollPaneAdjustable (ScrollPane sp, int orientation) { this.sp = sp; this.orientation = orientation; } | ScrollPaneAdjustable(int orientation){ super(orientation);} |
Unsafe.clear(start.add(Offset.fromIntZeroExtend(memPtr)), Extent.fromIntZeroExtend(size)); | Unsafe.clear(start.add(Offset.fromIntZeroExtend(memPtr)), Extent.fromIntSignExtend(size)); | public void clear(int memPtr, int size) { testMemPtr(memPtr, size); Unsafe.clear(start.add(Offset.fromIntZeroExtend(memPtr)), Extent.fromIntZeroExtend(size)); } |
if (this.start.GT(other.end)) { | if (this.start.GE(other.end)) { | public int compareTo(Region otherRegion) { final MemoryResourceImpl other = (MemoryResourceImpl) otherRegion; if (this.end.LE(other.start)) { // this < other return -1; } if (this.start.GT(other.end)) { // this > other return 1; } // this overlaps other return 0; } |
return start.loadObjectReference(Offset.fromIntSignExtend(memPtr)).toObject(); | return start.loadObjectReference(Offset.fromIntSignExtend(memPtr)); | public Object getObject(int memPtr) { if (this.data != null) { throw new SecurityException("Cannot get an Object from a byte-array"); } testMemPtr(memPtr, 4); return start.loadObjectReference(Offset.fromIntSignExtend(memPtr)).toObject(); } |
start.store(value, Offset.fromIntSignExtend(value)); | start.store(value, Offset.fromIntSignExtend(memPtr)); | public void setInt(int memPtr, int value) { testMemPtr(memPtr, 4); start.store(value, Offset.fromIntSignExtend(value)); } |
this.mem = mem; | public EEPRO100TxFD(MemoryResource mem) { this.mem = mem; } | |
if ("".equals(attr.value) && !input.xml11) error("illegal use of 1.1-style prefix unbinding in 1.0 document"); | private boolean addNamespace(Attribute attr) throws XMLStreamException { if ("xmlns".equals(attr.name)) { LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst(); if (ctx.get(XMLConstants.DEFAULT_NS_PREFIX) != null) error("Duplicate default namespace declaration"); if (XMLC... | |
if (!namespaceAware) | if (!namespaceAware || namespaces.isEmpty()) | public int getNamespaceCount() { if (!namespaceAware) return 0; switch (event) { case XMLStreamConstants.START_ELEMENT: case XMLStreamConstants.END_ELEMENT: LinkedHashMap ctx = (LinkedHashMap) namespaces.getFirst(); return ctx.size(); default: return 0; } } |
expandPE = saved; | private void readAttlistDecl() throws IOException, XMLStreamException { requireWhitespace(); String elementName = readNmtoken(true); boolean white = tryWhitespace(); while (!tryRead('>')) { if (!white) error("whitespace required before attribute definition"); readAttDef(ele... | |
read(tmpBuf, 0, i); | int count = 0, remaining = i; do { int r = read(tmpBuf, 0, remaining); count += r; remaining -= r; } while (count < i); | private int readCharData(String prefix) throws IOException, XMLStreamException { boolean white = true; buf.setLength(0); if (prefix != null) buf.append(prefix); boolean done = false; boolean entities = false; while (!done) { // Block read mark(tmpBuf.length); int l... |
expandPE = saved; | private void readElementDecl() throws IOException, XMLStreamException { requireWhitespace(); String name = readNmtoken(true); requireWhitespace(); readContentspec(name); skipWhitespace(); require('>'); } | |
{ char x = ref[i]; if ((flags & (LIT_ATTRIBUTE | LIT_PUBID)) != 0 && (x == 0x0a || x == 0x0d)) x = 0x20; else if ((flags & LIT_ATTRIBUTE) != 0 && x == 0x09) x = 0x20; literalBuf.append(x); } | literalBuf.append(ref[i]); | private String readLiteral(int flags, boolean recognizePEs) throws IOException, XMLStreamException { boolean saved = expandPE; int delim = readCh(); if (delim != 0x27 && delim != 0x22) error("expected '\"' or \"'\"", "U+" + Integer.toHexString(delim)); literalBuf.setLength(0); if ((flags & LIT... |
public float getLayoutAlignmentX(Container target) { return 0.0f; } | public float getLayoutAlignmentX (Container target) { return Component.CENTER_ALIGNMENT; } | public float getLayoutAlignmentX(Container target) { return 0.0f; } |
public float getLayoutAlignmentY(Container target) { return 0.0f; } | public float getLayoutAlignmentY (Container target) { return Component.CENTER_ALIGNMENT; } | public float getLayoutAlignmentY(Container target) { return 0.0f; } |
public void invalidateLayout(Container target) { } | public void invalidateLayout (Container target) { this.layoutInfo = null; } | public void invalidateLayout(Container target) { } |
public void layoutContainer(Container parent) { } | public void layoutContainer (Container parent) { arrangeGrid (parent); } | public void layoutContainer(Container parent) { } |
public Dimension maximumLayoutSize(Container target) { return null; } | public Dimension maximumLayoutSize (Container target) { return new Dimension (Integer.MAX_VALUE, Integer.MAX_VALUE); } | public Dimension maximumLayoutSize(Container target) { return null; } |
public Dimension minimumLayoutSize(Container parent) { return null; } | public Dimension minimumLayoutSize (Container parent) { if (parent == null) return new Dimension (0, 0); GridBagLayoutInfo li = getLayoutInfo (parent, MINSIZE); return getMinSize (parent, li); } | public Dimension minimumLayoutSize(Container parent) { return null; } |
public Dimension preferredLayoutSize(Container parent) { return null; } | public Dimension preferredLayoutSize (Container parent) { if (parent == null) return new Dimension (0, 0); GridBagLayoutInfo li = getLayoutInfo (parent, PREFERREDSIZE); return getMinSize (parent, li); } | public Dimension preferredLayoutSize(Container parent) { return null; } |
public void setConstraints(Component comp, GridBagConstraints constraints) { } | public void setConstraints (Component component, GridBagConstraints constraints) { GridBagConstraints clone = (GridBagConstraints) constraints.clone(); if (clone.gridx < 0) clone.gridx = GridBagConstraints.RELATIVE; if (clone.gridy < 0) clone.gridy = GridBagConstraints.RELATIVE; if (clone.gridwidth == 0) clone.gridw... | public void setConstraints(Component comp, GridBagConstraints constraints) { } |
FontMetrics(Font font) { | protected FontMetrics(Font font) { | FontMetrics(Font font){ this.font = font;} |
bytesWidth(byte buf[], int offset, int len) { | public int bytesWidth(byte[] buf, int offset, int len) { | bytesWidth(byte buf[], int offset, int len){ int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth((char)buf[i]); return(total_width);} |
return(total_width); } | return total_width; } | bytesWidth(byte buf[], int offset, int len){ int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth((char)buf[i]); return(total_width);} |
getFont() { return(font); } | public Font getFont() { return font; } | getFont(){ return(font);} |
getLeading() { return(0); } | public int getLeading() { return 0; } | getLeading(){ return(0);} |
getMaxAdvance() { return(-1); } | public int getMaxAdvance() { return -1; } | getMaxAdvance(){ return(-1);} |
getMaxDecent() { return getDescent (); } | public int getMaxDecent() { return getDescent(); } | getMaxDecent(){ return getDescent ();} |
getWidths() { int [] result = new int[256]; for(char i = 0; i < 256; i++) | public int[] getWidths() | getWidths(){ int [] result = new int[256]; for(char i = 0; i < 256; i++) { result[i]= charWidth(i); } return(result);} |
result[i]= charWidth(i); | int[] result = new int[256]; for (char i = 0; i < 256; i++) result[i] = charWidth(i); return result; | getWidths(){ int [] result = new int[256]; for(char i = 0; i < 256; i++) { result[i]= charWidth(i); } return(result);} |
return(result); } | getWidths(){ int [] result = new int[256]; for(char i = 0; i < 256; i++) { result[i]= charWidth(i); } return(result);} | |
toString() { | public String toString() { | toString(){ return (this.getClass() + "[font=" + font + ",ascent=" + getAscent() + ",descent=" + getDescent() + ",height=" + getHeight() + "]");} |
public abstract boolean visit(VmThreadVisitor visitor); | public boolean visit(VmThreadVisitor visitor) { VmThreadQueueEntry p = first; while (p != null) { if (!visitor.visit(p.thread)) { return false; } p = p.next; } return true; } | public abstract boolean visit(VmThreadVisitor visitor); |
byte[] result = new byte[] { (byte) h0, (byte) (h0 >>> 8), (byte) (h0 >>> 16), (byte) (h0 >>> 24), (byte) h1, (byte) (h1 >>> 8), (byte) (h1 >>> 16), (byte) (h1 >>> 24), (byte) h2, (byte) (h2 >>> 8), (byte) (h2 >>> 16), (byte) (h2 >>> 24), (byte) h3, (byte) (h3 >>> 8), (byte) (h3 >>> 16), (byte) (h3 >>> 24) }; return r... | return new byte[] { (byte) h0, (byte)(h0 >>> 8), (byte)(h0 >>> 16), (byte)(h0 >>> 24), (byte) h1, (byte)(h1 >>> 8), (byte)(h1 >>> 16), (byte)(h1 >>> 24), (byte) h2, (byte)(h2 >>> 8), (byte)(h2 >>> 16), (byte)(h2 >>> 24), (byte) h3, (byte)(h3 >>> 8), (byte)(h3 >>> 16), (byte)(h3 >>> 24) }; | protected byte[] getResult() { byte[] result = new byte[] { (byte) h0, (byte) (h0 >>> 8), (byte) (h0 >>> 16), (byte) (h0 >>> 24), (byte) h1, (byte) (h1 >>> 8), (byte) (h1 >>> 16), (byte) (h1 >>> 24), ... |
valid = Boolean.valueOf (DIGEST0.equals(Util.toString(new RipeMD128().digest()))); | String d = Util.toString(new RipeMD128().digest()); valid = Boolean.valueOf(DIGEST0.equals(d)); | public boolean selfTest() { if (valid == null) { valid = Boolean.valueOf (DIGEST0.equals(Util.toString(new RipeMD128().digest()))); } return valid.booleanValue(); } |
{ X[i] = (in[offset++] & 0xFF) | (in[offset++] & 0xFF) << 8 | (in[offset++] & 0xFF) << 16 | in[offset++] << 24; } | X[i] = (in[offset++] & 0xFF) | (in[offset++] & 0xFF) << 8 | (in[offset++] & 0xFF) << 16 | in[offset++] << 24; | protected void transform(byte[] in, int offset) { int A, B, C, D, Ap, Bp, Cp, Dp, T, s, i; // encode 64 bytes from input block into an array of 16 unsigned // integers. for (i = 0; i < 16; i++) { X[i] = (in[offset++] & 0xFF) | (in[offset++] & 0xFF) << 8 | (in[offset++] & 0xFF) <... |
X509CRLEntry(int version, InputStream encoded) | X509CRLEntry(int version, DERReader encoded) | X509CRLEntry(int version, InputStream encoded) throws CRLException, IOException { super(); extensions = new HashMap(); critOids = new HashSet(); nonCritOids = new HashSet(); try { parse(version, encoded); } catch (IOException ioe) { throw ioe; } catch (Except... |
critOids = new HashSet(); nonCritOids = new HashSet(); | X509CRLEntry(int version, InputStream encoded) throws CRLException, IOException { super(); extensions = new HashMap(); critOids = new HashSet(); nonCritOids = new HashSet(); try { parse(version, encoded); } catch (IOException ioe) { throw ioe; } catch (Except... | |
return ((X509CRLEntry) o).serialNo.equals(serialNo) && ((X509CRLEntry) o).revocationDate.equals(revocationDate); | if (!(o instanceof X509CRLEntry)) return false; return ((X509CRLEntry) o).getSerialNumber().equals(serialNo) && ((X509CRLEntry) o).getRevocationDate().equals(revocationDate); | public boolean equals(Object o) { return ((X509CRLEntry) o).serialNo.equals(serialNo) && ((X509CRLEntry) o).revocationDate.equals(revocationDate); } |
private void parse(int version, InputStream in) throws Exception | private void parse(int version, DERReader der) throws Exception | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... |
DERReader der = new DERReader(in); | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... | |
throw new ASN1ParsingException("malformed revokedCertificate"); | throw new IOException("malformed revokedCertificate"); | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... |
len += DERWriter.definiteEncodingSize(val.getLength()) + val.getLength() + 1; | len += val.getEncodedLength(); debug("userCertificate == " + serialNo + " current count == " + len); | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... |
len += DERWriter.definiteEncodingSize(val.getLength()) + val.getLength() + 1; | len += val.getEncodedLength(); debug("revocationDate == " + revocationDate + " current count == " + len); | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... |
throw new ASN1ParsingException("extra data in CRL entry"); while (len < entry.getLength()) | throw new IOException("extra data in CRL entry"); DERValue exts = der.read(); if (!exts.isConstructed()) throw new IOException("malformed Extensions"); debug("start Extensions len == " + exts.getLength()); len = 0; while (len < exts.getLength()) | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... |
throw new ASN1ParsingException("malformed Extension"); OID extOid = (OID) der.read().getValue(); Boolean critical = Boolean.valueOf(false); DERValue val2 = der.read(); if (val2.getValue() instanceof Boolean) { critical = (Boolean) val2.getValue(); val2 = der.read(); } byte[] ext = (byte[]) val2.getValue(); extensions.p... | throw new IOException("malformed Extension"); debug("start Extension len == " + val.getLength()); Extension e = new Extension(val.getEncoded()); extensions.put(e.getOid(), e); der.skip(val.getLength()); | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... |
debug("current count == " + len); | private void parse(int version, InputStream in) throws Exception { DERReader der = new DERReader(in); DERValue entry = der.read(); if (!entry.isConstructed()) throw new ASN1ParsingException("malformed revokedCertificate"); encoded = entry.getEncoded(); int len = 0; DERValue val = der.read(); ... | |
+ revocationDate + " critExt=" + critOids + " ext=" + nonCritOids; | + revocationDate + " ext=" + extensions; | public String toString() { return "X509CRLEntry serial=" + serialNo + " revocation date=" + revocationDate + " critExt=" + critOids + " ext=" + nonCritOids; } |
cdrBufOutput output = new cdrBufOutput(); | BufferedCdrOutput output = new BufferedCdrOutput(); | public static boolean insertSysException(Any into, SystemException exception) { try { cdrBufOutput output = new cdrBufOutput(); String m_exception_id = getRepositoryId(exception.getClass()); output.write_string(m_exception_id); output.write_ulong(exception.minor); Completio... |
universalHolder h = new universalHolder(output); | GeneralHolder h = new GeneralHolder(output); | public static boolean insertSysException(Any into, SystemException exception) { try { cdrBufOutput output = new cdrBufOutput(); String m_exception_id = getRepositoryId(exception.getClass()); output.write_string(m_exception_id); output.write_ulong(exception.minor); Completio... |
recordTypeCode r = new recordTypeCode(TCKind.tk_except); | RecordTypeCode r = new RecordTypeCode(TCKind.tk_except); | public static boolean insertSysException(Any into, SystemException exception) { try { cdrBufOutput output = new cdrBufOutput(); String m_exception_id = getRepositoryId(exception.getClass()); output.write_string(m_exception_id); output.write_ulong(exception.minor); Completio... |
cdrBufInput in = new cdrBufInput(uEx.context_data); | BufferredCdrInput in = new BufferredCdrInput(uEx.context_data); | public static SystemException readSystemException(InputStream input, ServiceContext[] contexts) { SystemException exception; String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus completed = CompletionStatusHelper.read(input); try { exception = (SystemExcept... |
if (input instanceof cdrInput) | if (input instanceof AbstractCdrInput) | public static SystemException readSystemException(InputStream input, ServiceContext[] contexts) { SystemException exception; String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus completed = CompletionStatusHelper.read(input); try { exception = (SystemExcept... |
((cdrInput) input).cloneSettings(in); | ((AbstractCdrInput) input).cloneSettings(in); | public static SystemException readSystemException(InputStream input, ServiceContext[] contexts) { SystemException exception; String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus completed = CompletionStatusHelper.read(input); try { exception = (SystemExcept... |
shutdownThread = new ShutdownHook(); Runtime.getRuntime().addShutdownHook(shutdownThread); | private Main() { super(); } | |
if (Configuration.DEBUG) | private Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(KEYTOOL_TOOL, true); result.setHeader(Messages.getString("Main.19")); //$NON-NLS-1$ result.setFooter(Messages.getString("Main.20")); //$NON-NLS-1$ OptionGroup cmdGro... | |
if (Configuration.DEBUG) | public static final void main(String[] args) { log.entering(Main.class.getName(), "main", args); //$NON-NLS-1$ Main tool = new Main(); int result = 1; try { tool.setup(); tool.start(args); result = 0; } catch (OptionException x) { System.err.println(x.getMess... | |
if (Configuration.DEBUG) | private void setup() { log.entering(this.getClass().getName(), "setup"); //$NON-NLS-1$ cmdLineParser = getParser(); gnuCryptoProviderNdx = ProviderUtil.addProvider(new GnuCrypto()); gnuCallbacksNdx = ProviderUtil.addProvider(new GnuCallbacks()); log.exiting(this.getClass().getName(), "setup"); //$NON-... | |
if (Configuration.DEBUG) | private void start(String[] args) throws Exception { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ if (args == null || args.length == 0) throw new OptionException(""); //$NON-NLS-1$ String opt; Command cmd; while (args.length > 0) { opt = args[0]; cmd = null; ... | |
private void teardown() | void teardown() | private void teardown() { log.entering(this.getClass().getName(), "teardown"); //$NON-NLS-1$ // if we added our own providers remove them if (gnuCryptoProviderNdx > 0) ProviderUtil.removeProvider(Registry.GNU_CRYPTO); if (gnuCallbacksNdx > 0) ProviderUtil.removeProvider("GNU-CALLBACKS"); //$NON... |
if (Configuration.DEBUG) | private void teardown() { log.entering(this.getClass().getName(), "teardown"); //$NON-NLS-1$ // if we added our own providers remove them if (gnuCryptoProviderNdx > 0) ProviderUtil.removeProvider(Registry.GNU_CRYPTO); if (gnuCallbacksNdx > 0) ProviderUtil.removeProvider("GNU-CALLBACKS"); //$NON... | |
determineNumLines(); | public WrappedLine(Element elem) { super(elem); determineNumLines(); } | |
void determineNumLines() | private int determineNumLines() | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... |
numLines = 0; | int nLines = 0; | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... |
if (end == 0) return; int breakPoint; | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... | |
numLines ++; | nLines++; | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... |
breakPoint = calculateBreakPosition(i, end); | int breakPoint = calculateBreakPosition(i, end); | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... |
if (breakPoint == 0) return; | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... | |
break; | i = breakPoint + 1; | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... |
return nLines; | void determineNumLines() { numLines = 0; int end = getEndOffset(); if (end == 0) return; int breakPoint; for (int i = getStartOffset(); i < end;) { numLines ++; // careful: check that there's no off-by-one problem here // depending on ... | |
updateDamage((Rectangle)a); | Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); updateDamage(r); | public void insertUpdate (DocumentEvent changes, Shape a, ViewFactory f) { updateDamage((Rectangle)a); } |
updateDamage((Rectangle)a); | Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); updateDamage(r); | public void removeUpdate (DocumentEvent changes, Shape a, ViewFactory f) { // Note: This method is not called when characters from the // end of the document are removed. The reason for this // can be found in the implementation of View.forwardUpdate: // The document event will denote offsets... |
if (a == null || a.isEmpty()) | int nLines = determineNumLines(); if (numLines != nLines) | void updateDamage (Rectangle a) { // If the allocation area is empty we can't do anything useful. // As determining the number of lines is impossible in that state we // reset it to an invalid value which can then be recalculated at a // later point. if (a == null || a.isEmpty()) ... |
numLines = 1; return; | numLines = nLines; preferenceChanged(this, false, true); getContainer().repaint(); | void updateDamage (Rectangle a) { // If the allocation area is empty we can't do anything useful. // As determining the number of lines is impossible in that state we // reset it to an invalid value which can then be recalculated at a // later point. if (a == null || a.isEmpty()) ... |
int oldNumLines = numLines; determineNumLines(); if (numLines != oldNumLines) preferenceChanged(this, false, true); else | else if (a != null) | void updateDamage (Rectangle a) { // If the allocation area is empty we can't do anything useful. // As determining the number of lines is impossible in that state we // reset it to an invalid value which can then be recalculated at a // later point. if (a == null || a.isEmpty()) ... |
return end; | return end - 1; | public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); // Although calling modelToView with the last possible offset will // cause a BadLocationException in CompositeView it is... |
Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomInset()-ti); if (alloc.isEmpty()) return 0; updateMetrics(); | Segment s = new Segment(); | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... |
getDocument().getText(p0, p1 - p0, getLineBuffer()); | getDocument().getText(p0, p1 - p0, s); | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... |
catch (BadLocationException ble) | catch (BadLocationException ex) | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... |
throw new InternalError("Invalid offsets p0: " + p0 + " - p1: " + p1); | assert false : "Couldn't load text"; | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... |
int width = getWidth(); int pos; | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... | |
return p0 + Utilities.getBreakLocation(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, 0); | pos = p0 + Utilities.getBreakLocation(s, metrics, tabBase, tabBase + width, this, p0); | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... |
return p0 + Utilities.getTabbedTextOffset(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, 0, true); | pos = p0 + Utilities.getTabbedTextOffset(s, metrics, tabBase, tabBase + width, this, p0, false); return pos; | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... |
super.changedUpdate(e, a, viewFactory); | updateChildren(e, a); | public void changedUpdate (DocumentEvent e, Shape a, ViewFactory f) { super.changedUpdate(e, a, viewFactory); // No repaint needed, as this is done by the WrappedLine instances. } |
super.insertUpdate(e, a, viewFactory); | updateChildren(e, a); | public void insertUpdate (DocumentEvent e, Shape a, ViewFactory f) { super.insertUpdate(e, a, viewFactory); // No repaint needed, as this is done by the WrappedLine instances. } |
Rectangle r = a != null && isAllocationValid() ? getInsideAllocation(a) : null; View v = getViewAtPosition(e.getOffset(), r); if (v != null) v.insertUpdate(e, r, f); | public void insertUpdate (DocumentEvent e, Shape a, ViewFactory f) { super.insertUpdate(e, a, viewFactory); // No repaint needed, as this is done by the WrappedLine instances. } | |
JTextComponent host = (JTextComponent)getContainer(); float tabSizePixels = getTabSize() * host.getFontMetrics(host.getFont()).charWidth('m'); return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels; | int next = (int) x; if (tabSize != 0) { int numTabs = ((int) x - tabBase) / tabSize; next = tabBase + (numTabs + 1) * tabSize; } return next; | public float nextTabStop(float x, int tabStop) { JTextComponent host = (JTextComponent)getContainer(); float tabSizePixels = getTabSize() * host.getFontMetrics(host.getFont()).charWidth('m'); return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels; } |
Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds(); tabBase = r.x; | public void paint(Graphics g, Shape a) { JTextComponent comp = (JTextComponent)getContainer(); // Ensure metrics are up-to-date. updateMetrics(); selectionStart = comp.getSelectionStart(); selectionEnd = comp.getSelectionEnd(); selectedColor = comp.getSelectedTextColor(); unselectedColor = c... | |
super.removeUpdate(e, a, viewFactory); | updateChildren(e, a); | public void removeUpdate (DocumentEvent e, Shape a, ViewFactory f) { super.removeUpdate(e, a, viewFactory); // No repaint needed, as this is done by the WrappedLine instances. } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.