rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return qName; | return new QName(uri, localName, prefix); | final QName getQName(String name) { QName qName = QName.valueOf(name); String prefix = qName.getPrefix(); String uri = qName.getNamespaceURI(); if (prefix != null && (uri == null || uri.length() == 0)) { uri = getNamespaceURI(prefix); String localName = qName.getLocalPart(); qNa... |
String name = getRequiredAttribute(attrs, "name", node); | QName name = getQName(getRequiredAttribute(attrs, "name", node)); | final List parseWithParams(Node node) throws TransformerConfigurationException, XPathExpressionException { List ret = new LinkedList(); while (node != null) { String namespaceUri = node.getNamespaceURI(); if (Stylesheet.XSL_NS.equals(namespaceUri) && Node.ELEMENT_NODE == node.g... |
push(true); push(false); | withParameters = new LinkedList(); for (int i = 0; i < 3; i++) { push(i); } | Bindings(Stylesheet stylesheet) { this.stylesheet = stylesheet; variables = new LinkedList(); parameters = new LinkedList(); push(true); push(false); } |
mode); | mode, isAnyNode); | Template clone(Stylesheet stylesheet) { // FIXME by cloning we lose the imports() functionality, so // apply-imports will be broken. return new Template(stylesheet, name, (match == null) ? null : (Pattern) match.clone(stylesheet), ... |
global); | type); | TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new ParameterNode(name, select.clone(stylesheet), global); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = n... |
ParameterNode(String name, Expr select, boolean global) | ParameterNode(QName name, Expr select, int type) | ParameterNode(String name, Expr select, boolean global) { this.name = name; this.select = select; this.global = global; } |
this.global = global; | this.type = type; | ParameterNode(String name, Expr select, boolean global) { this.name = name; this.select = select; this.global = global; } |
int precedence, double priority, QName mode) | int precedence, String priorityAttr, QName mode) | Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode) { this.stylesheet = stylesheet; this.name = name; this.match = match; this.node = node; // adjust priority if necessary // see XSLT section 5.5 Test tes... |
Test test = getNodeTest(match); if (test != null) | if (match instanceof Selector) { Selector selector = (Selector) match; Test[] tests = selector.getTests(); if (tests.length > 0) | Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode) { this.stylesheet = stylesheet; this.name = name; this.match = match; this.node = node; // adjust priority if necessary // see XSLT section 5.5 Test tes... |
if (nameTest.matchesAny() || nameTest.matchesAnyLocalName()) priority = -0.25d; | if (nameTest.matchesAny()) p = -0.25d; else if (nameTest.matchesAnyLocalName()) p = -0.20d; | Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode) { this.stylesheet = stylesheet; this.name = name; this.match = match; this.node = node; // adjust priority if necessary // see XSLT section 5.5 Test tes... |
priority = 0.0d; isAnyNode = false; | p = 0.0d; | Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode) { this.stylesheet = stylesheet; this.name = name; this.match = match; this.node = node; // adjust priority if necessary // see XSLT section 5.5 Test tes... |
priority = 0.0d; | p = 0.0d; | Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode) { this.stylesheet = stylesheet; this.name = name; this.match = match; this.node = node; // adjust priority if necessary // see XSLT section 5.5 Test tes... |
priority = -0.5d; isAnyNode = (nodeTypeTest.getNodeType() == 0); | p = -0.5d; a = (nodeTypeTest.getNodeType() == 0); | Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode) { this.stylesheet = stylesheet; this.name = name; this.match = match; this.node = node; // adjust priority if necessary // see XSLT section 5.5 Test tes... |
else isAnyNode = false; this.precedence = precedence; this.priority = priority; this.mode = mode; | } } this.priority = p; this.isAnyNode = a; | Template(Stylesheet stylesheet, QName name, Pattern match, TemplateNode node, int precedence, double priority, QName mode) { this.stylesheet = stylesheet; this.name = name; this.match = match; this.node = node; // adjust priority if necessary // see XSLT section 5.5 Test tes... |
WithParam(String name, Expr select) | WithParam(QName name, Expr select) | WithParam(String name, Expr select) { this.name = name; this.select = select; content = null; } |
public abstract void setColorModel(ColorModel model); | void setColorModel(ColorModel model); | public abstract void setColorModel(ColorModel model); |
public abstract void setDimensions(int width, int height); | void setDimensions(int width, int height); | public abstract void setDimensions(int width, int height); |
public abstract void setHints(int flags); | void setHints(int flags); | public abstract void setHints(int flags); |
public abstract void setPixels(int x, int y, int w, int h, | void setPixels(int x, int y, int w, int h, | public abstract void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize); |
public abstract void setProperties(Hashtable props); | void setProperties(Hashtable props); | public abstract void setProperties(Hashtable props); |
notBefore = (Date) val.getValue(); | notBefore = (Date) val.getValueAs (DER.GENERALIZED_TIME); | public PrivateKeyUsagePeriod(final byte[] encoded) throws IOException { super(encoded); DERReader der = new DERReader(encoded); DERValue val = der.read(); if (!val.isConstructed()) throw new IOException("malformed PrivateKeyUsagePeriod"); if (val.getLength() > 0) val = der.read(); if (val... |
notAfter = (Date) val.getValue(); | notAfter = (Date) val.getValueAs (DER.GENERALIZED_TIME); | public PrivateKeyUsagePeriod(final byte[] encoded) throws IOException { super(encoded); DERReader der = new DERReader(encoded); DERValue val = der.read(); if (!val.isConstructed()) throw new IOException("malformed PrivateKeyUsagePeriod"); if (val.getLength() > 0) val = der.read(); if (val... |
changeSupport.firePropertyChange("cellEditor", oldValue, cellEditor); } | public void setCellEditor(TableCellEditor cellEditor) { this.cellEditor = cellEditor; } | |
firePropertyChange(CELL_RENDERER_PROPERTY, oldRenderer, cellRenderer); | changeSupport.firePropertyChange(CELL_RENDERER_PROPERTY, oldRenderer, cellRenderer); | public void setCellRenderer(TableCellRenderer renderer) { if (cellRenderer == renderer) return; TableCellRenderer oldRenderer = cellRenderer; cellRenderer = renderer; firePropertyChange(CELL_RENDERER_PROPERTY, oldRenderer, cellRenderer); } |
firePropertyChange(HEADER_RENDERER_PROPERTY, oldRenderer, headerRenderer); | changeSupport.firePropertyChange(HEADER_RENDERER_PROPERTY, oldRenderer, headerRenderer); | public void setHeaderRenderer(TableCellRenderer renderer) { if (headerRenderer == renderer) return; TableCellRenderer oldRenderer = headerRenderer; headerRenderer = renderer; firePropertyChange(HEADER_RENDERER_PROPERTY, oldRenderer, headerRenderer); } |
firePropertyChange(HEADER_VALUE_PROPERTY, oldValue, headerValue); | changeSupport.firePropertyChange(HEADER_VALUE_PROPERTY, oldValue, headerValue); | public void setHeaderValue(Object headerValue) { if (this.headerValue == headerValue) return; Object oldValue = this.headerValue; this.headerValue = headerValue; firePropertyChange(HEADER_VALUE_PROPERTY, oldValue, headerValue); } |
changeSupport.firePropertyChange("identifier", oldValue, identifier); } | public void setIdentifier(Object identifier) { this.identifier = identifier; } | |
setWidth(getWidth()); setPreferredWidth(getPreferredWidth()); | changeSupport.firePropertyChange("maxWidth", oldValue, maxWidth); } | public void setMaxWidth(int maxWidth) { this.maxWidth = maxWidth; setWidth(getWidth()); setPreferredWidth(getPreferredWidth()); } |
setWidth(getWidth()); setPreferredWidth(getPreferredWidth()); | changeSupport.firePropertyChange("minWidth", oldValue, minWidth); } | public void setMinWidth(int minWidth) { this.minWidth = minWidth; setWidth(getWidth()); setPreferredWidth(getPreferredWidth()); } |
changeSupport.firePropertyChange("modelIndex", oldValue, modelIndex); } | public void setModelIndex(int modelIndex) { this.modelIndex = modelIndex; } | |
firePropertyChange("preferredWidth", oldPrefWidth, this.preferredWidth); | changeSupport.firePropertyChange("preferredWidth", oldPrefWidth, this.preferredWidth); | public void setPreferredWidth(int preferredWidth) { int oldPrefWidth = this.preferredWidth; if (preferredWidth < minWidth) this.preferredWidth = minWidth; else if (preferredWidth > maxWidth) this.preferredWidth = maxWidth; else this.preferredWidth = preferredWidth; firePropertyChange("p... |
changeSupport.firePropertyChange("isResizable", !this.isResizable, isResizable); } | public void setResizable(boolean isResizable) { this.isResizable = isResizable; } | |
firePropertyChange("width", oldWidth, width); | changeSupport.firePropertyChange("width", oldWidth, width); | public void setWidth(int newWidth) { int oldWidth = width; if (newWidth < minWidth) width = minWidth; else if (newWidth > maxWidth) width = maxWidth; else width = newWidth; if (width == oldWidth) return; // We do have a constant field COLUMN_WIDTH_PROPERTY, // however, tests ... |
if (headerRenderer == null) return; Component c = headerRenderer.getTableCellRendererComponent(null, getHeaderValue(), false, false, 0, 0); Dimension min = c.getMinimumSize(); Dimension max = c.getMaximumSize(); Dimension pref = c.getPreferredSize(); setMinWidth(min.width); setMaxWidth(max.width); setPreferredWidth(pre... | public void sizeWidthToFit() { // TODO } | |
protected AccessibleJRadioButtonMenuItem(JRadioButtonMenuItem component) | protected AccessibleJRadioButtonMenuItem() | protected AccessibleJRadioButtonMenuItem(JRadioButtonMenuItem component) { super(component); // TODO } |
super(component); | protected AccessibleJRadioButtonMenuItem(JRadioButtonMenuItem component) { super(component); // TODO } | |
accessibleContext = new AccessibleJRadioButtonMenuItem(this); | accessibleContext = new AccessibleJRadioButtonMenuItem(); | public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJRadioButtonMenuItem(this); return accessibleContext; } |
AccessibleJMenuItem(JMenuItem component) | AccessibleJMenuItem() | AccessibleJMenuItem(JMenuItem component) { super(component); // TODO } |
super(component); | AccessibleJMenuItem(JMenuItem component) { super(component); // TODO } | |
public ColorSelectionModel getColorSelectionModel() { return null; | public ColorSelectionModel getColorSelectionModel() { if (chooser != null) return chooser.getSelectionModel(); return null; | public ColorSelectionModel getColorSelectionModel() { return null; // TODO } // getColorSelectionModel() |
public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize) | public SpinnerNumberModel() | public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize) { this(new Integer(value), new Integer(minimum), new Integer(maximum), new Integer(stepSize)); } |
this(new Integer(value), new Integer(minimum), new Integer(maximum), new Integer(stepSize)); | this(new Integer(0), null, null, new Integer(1)); | public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize) { this(new Integer(value), new Integer(minimum), new Integer(maximum), new Integer(stepSize)); } |
public void paint(Graphics graphics) { | public void paint(Graphics graphics) { super.paint(graphics); | public void paint(Graphics graphics) { // TODO } // paint() |
protected Color getColorFromModel() { return null; | protected Color getColorFromModel() { if (chooser != null) return chooser.getColor(); return null; | protected Color getColorFromModel() { return null; // TODO } // getColorFromModel() |
public static Integer getInteger(String nm, Integer def) | public static Integer getInteger(String nm) | public static Integer getInteger(String nm, Integer def) { if (nm == null || "".equals(nm)) return def; nm = System.getProperty(nm); if (nm == null) return def; try { return decode(nm); } catch (NumberFormatException e) { return def; } } |
if (nm == null || "".equals(nm)) return def; nm = System.getProperty(nm); if (nm == null) return def; try { return decode(nm); } catch (NumberFormatException e) { return def; } | return getInteger(nm, null); | public static Integer getInteger(String nm, Integer def) { if (nm == null || "".equals(nm)) return def; nm = System.getProperty(nm); if (nm == null) return def; try { return decode(nm); } catch (NumberFormatException e) { return def; } } |
metrics = g.getFontMetrics(); | protected void drawLine(int lineIndex, Graphics g, int x, int y) { try { metrics = g.getFontMetrics(); // FIXME: Selected text are not drawn yet. Element line = getElement().getElement(lineIndex); drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset() - 1); //... | |
drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset() - 1); | int startOffset = line.getStartOffset(); int endOffset = line.getEndOffset(); if (selectionStart <= startOffset) if (selectionEnd <= startOffset) { drawUnselectedText(g, x, y, startOffset, endOffset); } else if (selectionEnd <= endOffset) { x = drawSelectedText(g, x, y, startOffset, selectionEnd); drawUnselectedTe... | protected void drawLine(int lineIndex, Graphics g, int x, int y) { try { metrics = g.getFontMetrics(); // FIXME: Selected text are not drawn yet. Element line = getElement().getElement(lineIndex); drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset() - 1); //... |
return Utilities.drawTabbedText(segment, x, y, g, this, 0); | return Utilities.drawTabbedText(segment, x, y, g, this, segment.offset); | protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { g.setColor(selectedColor); Segment segment = getLineBuffer(); getDocument().getText(p0, p1 - p0, segment); return Utilities.drawTabbedText(segment, x, y, g, this, 0); } |
for (int i = 0; i < root.getElementCount(); i++) | int count = root.getElementCount(); for (int i = 0; i < count; i++) | public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.ge... |
y += metrics.getHeight(); | y += height; | public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.ge... |
charsWidth(char buf[], int offset, int len) { | public int charsWidth(char[] buf, int offset, int len) { | charsWidth(char buf[], int offset, int len){ int total_width = 0; for (int i = offset; i < len; i++) total_width += charWidth(buf[i]); return(total_width);} |
return(total_width); } | return total_width; } | charsWidth(char buf[], int offset, int len){ int total_width = 0; for (int i = offset; i < len; i++) total_width += charWidth(buf[i]); return(total_width);} |
if (len > 0 && (c == '\t' || c == '\n')) | if (c == '\t' || c == '\n') | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font... |
} | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font... | |
charWidth(char ch) { return(1); } | public int charWidth(int ch) { return charWidth((char) ch); } | charWidth(char ch){ return(1);} |
if (!e.isTemporary() && textComponent.getSelectionStart() != textComponent.getSelectionEnd()) { SecurityManager sm = System.getSecurityManager(); try { if (sm != null) sm.checkSystemClipboardAccess(); Clipboard cb = Toolkit.getDefaultToolkit().getSystemSelection(); if (cb != null) { StringSelection selection = new Str... | public void focusLost(FocusEvent e) { textComponent.repaint(); } | |
return ("label=" + getLabel() + ",actionCommand=" + getActionCommand() + "," + super.paramString()); | return getName () + "," + getX () + "," + getY () + "," + getWidth () + "x" + getHeight () + ",label=" + getLabel (); | paramString(){ return ("label=" + getLabel() + ",actionCommand=" + getActionCommand() + "," + super.paramString());} |
public PathIterator getPathIterator(AffineTransform at) { final GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO, 32); final float x = (float)getX(); final float y = (float)getY(); final float w = (float)getWidth(); final float h = (float)getHeight(); final float hw = w / 2; final float hh = h / 2; final f... | public PathIterator getPathIterator(AffineTransform at) { return new Arc2D.ArcIterator(this, at); | public PathIterator getPathIterator(AffineTransform at) { final GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO, 32); final float x = (float)getX(); final float y = (float)getY(); final float w = (float)getWidth(); final float h = (float)getHeight(); final float hw = w / 2; final float hh = h / 2; ... |
rex.initCause(ex); | rex.detail = ex; | public RemoteException mapSystemException(SystemException ex) { RemoteException rex; String status; switch (ex.completed.value()) { case CompletionStatus._COMPLETED_MAYBE: status = "Maybe"; break; case CompletionStatus._COMPLETED_NO: status = "No"; break; ... |
public AccessException(String s, Exception e) | public AccessException(String s) | public AccessException(String s, Exception e) { super(s, e); } |
super(s, e); | super(s); | public AccessException(String s, Exception e) { super(s, e); } |
public activeObjectMap.Obj findObject(org.omg.CORBA.Object object) | public AOM.Obj findObject(org.omg.CORBA.Object object) | public activeObjectMap.Obj findObject(org.omg.CORBA.Object object) { activeObjectMap.Obj h = aom.findObject(object); if (h != null) return h; else { for (int i = 0; i < children.size(); i++) { h = ((gnuPOA) children.get(i)).findObject(object); if (h != null) ... |
activeObjectMap.Obj h = aom.findObject(object); | AOM.Obj h = aom.findObject(object); | public activeObjectMap.Obj findObject(org.omg.CORBA.Object object) { activeObjectMap.Obj h = aom.findObject(object); if (h != null) return h; else { for (int i = 0; i < children.size(); i++) { h = ((gnuPOA) children.get(i)).findObject(object); if (h != null) ... |
int nmax = next.getMaximumLength(); if (nmax < Integer.MAX_VALUE && maximumLength < Integer.MAX_VALUE) maximumLength += nmax; else maximumLength = Integer.MAX_VALUE; | private void addToken(REToken next) { if (next == null) return; minimumLength += next.getMinimumLength(); if (firstToken == null) { lastToken = firstToken = next; } else { // if chain returns false, it "rejected" the token due to // an optimization, and next was combined with lastToken if (... | |
if (match(input, mymatch)) { REMatch longest = mymatch; | if (re.match(input, mymatch)) { REMatch best = mymatch; /* | REMatch getMatchImpl(CharIndexed input, int anchor, int eflags, StringBuffer buffer) { // Create a new REMatch to hold results REMatch mymatch = new REMatch(numSubs, anchor, eflags); do { // Optimization: check if anchor + minimumLength > length if (minimumLength == 0 || input.charAt(minimumLength-... |
if (mymatch.index > longest.index) { longest = mymatch; | if (mymatch.index > best.index) { best = mymatch; | REMatch getMatchImpl(CharIndexed input, int anchor, int eflags, StringBuffer buffer) { // Create a new REMatch to hold results REMatch mymatch = new REMatch(numSubs, anchor, eflags); do { // Optimization: check if anchor + minimumLength > length if (minimumLength == 0 || input.charAt(minimumLength-... |
longest.end[0] = longest.index; longest.finish(input); return longest; | */ best.end[0] = best.index; best.finish(input); return best; | REMatch getMatchImpl(CharIndexed input, int anchor, int eflags, StringBuffer buffer) { // Create a new REMatch to hold results REMatch mymatch = new REMatch(numSubs, anchor, eflags); do { // Optimization: check if anchor + minimumLength > length if (minimumLength == 0 || input.charAt(minimumLength-... |
RE theBranch = new RE(firstToken, lastToken, numSubs, subIndex, minimumLength); | RE theBranch = new RE(firstToken, lastToken, numSubs, subIndex, minimumLength, maximumLength); | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... |
if ((currentToken.getMinimumLength() == 0) && (minMax.second == Integer.MAX_VALUE)) throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,newIndex); | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... | |
else if ("nrt".indexOf(pattern[index]) != -1) { switch (pattern[index]) { case 'n': asciiEsc = '\n'; break; case 't': asciiEsc = '\t'; break; case 'r': asciiEsc = '\r'; break; | if (("pP".indexOf(pattern[index]) != -1) && syntax.get(RESyntax.RE_NAMED_PROPERTY)) { np = getNamedProperty(pattern, index - 1, pLength); if (np == null) throw new REException("invalid escape sequence", REException.REG_ESCAPE, index); index = index - 1 + np.len - 1; | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... |
&& !(nested == 0 && (unit.ch == ')') && (syntax.get(RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))) ) | && !(nested == 0 && (unit.ch == ')') && (syntax.get(RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))) ) { | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... |
} | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... | |
int useIndex = (pure || lookAhead) ? 0 : nextSub + numSubs; | int useIndex = (pure || lookAhead || lookBehind || independent) ? 0 : nextSub + numSubs; | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... |
if (currentToken.getMinimumLength() == 0) throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index); | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... | |
else if (currentToken.getMinimumLength() == 0) throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index); | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... | |
else if (unit.bk && (unit.ch == '0') && syntax.get(RESyntax.RE_OCTAL_CHAR)) { CharExpression ce = getCharExpression(pattern, index - 2, pLength, syntax); if (ce == null) throw new REException("invalid octal character", REException.REG_ESCAPE, index); index = index - 2 + ce.len; addToken(currentToken); currentToken = ne... | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... | |
currentToken = new RETokenBackRef(subIndex,Character.digit(unit.ch,10),insens); | int numBegin = index - 1; int numEnd = pLength; for (int i = index; i < pLength; i++) { if (! Character.isDigit(pattern[i])) { numEnd = i; break; } } int num = parseInt(pattern, numBegin, numEnd-numBegin, 10); currentToken = new RETokenBackRef(subIndex,num,insens); index = numEnd; | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... |
branches.addElement(new RE(firstToken,lastToken,numSubs,subIndex,minimumLength)); | branches.addElement(new RE(firstToken,lastToken,numSubs,subIndex,minimumLength, maximumLength)); | protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ... |
boolean match(CharIndexed input, REMatch mymatch) { if (firstToken == null) return next(input, mymatch); | boolean match(CharIndexed input, REMatch mymatch) { if (firstToken == null) { return next(input, mymatch); } | boolean match(CharIndexed input, REMatch mymatch) { if (firstToken == null) return next(input, mymatch); // Note the start of this subexpression mymatch.start[subIndex] = mymatch.index; return firstToken.match(input, mymatch); } |
buffer.append( ((eflags & REG_NO_INTERPOLATE) > 0) ? replace : m.substituteInto(replace) ); | buffer.append(getReplacement(replace, m, eflags)); | private String substituteAllImpl(CharIndexed input,String replace,int index,int eflags) { StringBuffer buffer = new StringBuffer(); REMatch m; while ((m = getMatchImpl(input,index,eflags,buffer)) != null) { buffer.append( ((eflags & REG_NO_INTERPOLATE) > 0) ? replace : m.substituteInto(replace) ); ... |
buffer.append( ((eflags & REG_NO_INTERPOLATE) > 0) ? replace : m.substituteInto(replace) ); | buffer.append(getReplacement(replace, m, eflags)); | private String substituteImpl(CharIndexed input,String replace,int index,int eflags) { StringBuffer buffer = new StringBuffer(); REMatch m = getMatchImpl(input,index,eflags,buffer); if (m==null) return buffer.toString(); buffer.append( ((eflags & REG_NO_INTERPOLATE) > 0) ? replace : m.substituteInto(r... |
Dimension size; FontMetrics fm = getFontMetrics(getFont()); int fontHeight = fm.getMaxAscent() + fm.getMaxDescent(); int columnWidth = fm.charWidth('m'); | Dimension size = super.getPreferredSize(); | public Dimension getPreferredSize() { Dimension size; FontMetrics fm = getFontMetrics(getFont()); int fontHeight = fm.getMaxAscent() + fm.getMaxDescent(); int columnWidth = fm.charWidth('m'); if (columns != 0) { size = new Dimension(columns * columnWidth + 4, fontHeight + 4); } else ... |
{ size = new Dimension(columns * columnWidth + 4, fontHeight + 4); } else { size = new Dimension(10, 10); } | size.width = columns * getColumnWidth(); | public Dimension getPreferredSize() { Dimension size; FontMetrics fm = getFontMetrics(getFont()); int fontHeight = fm.getMaxAscent() + fm.getMaxDescent(); int columnWidth = fm.charWidth('m'); if (columns != 0) { size = new Dimension(columns * columnWidth + 4, fontHeight + 4); } else ... |
public void drawString(String text, int x, int y) { if (this.font != null) ((JNodeToolkit) Toolkit.getDefaultToolkit()).getFontManager() .drawText(this, text, font, x, y); | public void drawString(AttributedCharacterIterator iterator, float x, float y) { | public void drawString(String text, int x, int y) { // System.out.println("drawText():" + text); if (this.font != null) ((JNodeToolkit) Toolkit.getDefaultToolkit()).getFontManager() .drawText(this, text, font, x, y); } |
return MIN_THUMB_SIZE_FREE_STANDING; | retVal = MIN_THUMB_SIZE_FREE_STANDING; | protected Dimension getMinimumThumbSize() { if (isFreeStanding) return MIN_THUMB_SIZE_FREE_STANDING; else return MIN_THUMB_SIZE; } |
return MIN_THUMB_SIZE; | retVal = MIN_THUMB_SIZE; | protected Dimension getMinimumThumbSize() { if (isFreeStanding) return MIN_THUMB_SIZE_FREE_STANDING; else return MIN_THUMB_SIZE; } |
else retVal = new Dimension(0, 0); return retVal; } | protected Dimension getMinimumThumbSize() { if (isFreeStanding) return MIN_THUMB_SIZE_FREE_STANDING; else return MIN_THUMB_SIZE; } | |
if (! (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme)) { | protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) { // a disabled scrollbar has no thumb in the metal look and feel if (!c.isEnabled()) return; if (scrollbar.getOrientation() == HORIZONTAL) paintThumbHorizontal(g, c, thumbBounds); else paintThumbVertical(g, c, thu... | |
thumbBounds.width - 6, thumbBounds.height - 6, thumbHighlightColor, thumbLightShadowColor); | thumbBounds.width - 6, thumbBounds.height - 6, thumbHighlightColor, thumbLightShadowColor); } | protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) { // a disabled scrollbar has no thumb in the metal look and feel if (!c.isEnabled()) return; if (scrollbar.getOrientation() == HORIZONTAL) paintThumbHorizontal(g, c, thumbBounds); else paintThumbVertical(g, c, thu... |
MetalTheme theme = MetalLookAndFeel.getCurrentTheme(); if (theme instanceof OceanTheme && UIManager.get("ScrollBar.gradient") != null) { MetalUtils.paintGradient(g, x + 2, y + 2, w - 4, h - 2, SwingConstants.VERTICAL, "ScrollBar.gradient"); } else { | private void paintThumbHorizontal(Graphics g, JComponent c, Rectangle thumbBounds) { int x = thumbBounds.x; int y = thumbBounds.y; int w = thumbBounds.width; int h = thumbBounds.height; // first we fill the background g.setColor(thumbColor); if (isFreeStanding) g.fillRect(x, ... | |
if (theme instanceof OceanTheme) { g.setColor(thumbLightShadowColor); int middle = x + w / 2; g.drawLine(middle - 2, y + 4, middle - 2, y + h - 5); g.drawLine(middle, y + 4, middle, y + h - 5); g.drawLine(middle + 2, y + 4, middle + 2, y + h - 5); g.setColor(UIManager.getColor("ScrollBar.highlight")); g.drawLine(middle... | private void paintThumbHorizontal(Graphics g, JComponent c, Rectangle thumbBounds) { int x = thumbBounds.x; int y = thumbBounds.y; int w = thumbBounds.width; int h = thumbBounds.height; // first we fill the background g.setColor(thumbColor); if (isFreeStanding) g.fillRect(x, ... | |
MetalTheme theme = MetalLookAndFeel.getCurrentTheme(); if (theme instanceof OceanTheme && UIManager.get("ScrollBar.gradient") != null) { MetalUtils.paintGradient(g, x + 2, y + 2, w - 2, h - 4, SwingConstants.HORIZONTAL, "ScrollBar.gradient"); } else { | private void paintThumbVertical(Graphics g, JComponent c, Rectangle thumbBounds) { int x = thumbBounds.x; int y = thumbBounds.y; int w = thumbBounds.width; int h = thumbBounds.height; // first we fill the background g.setColor(thumbColor); if (isFreeStanding) g.fillRect(x, y, ... | |
if (theme instanceof OceanTheme) { g.setColor(thumbLightShadowColor); int middle = y + h / 2; g.drawLine(x + 4, middle - 2, x + w - 5, middle - 2); g.drawLine(x + 4, middle, x + w - 5, middle); g.drawLine(x + 4, middle + 2, x + w - 5, middle + 2); g.setColor(UIManager.getColor("ScrollBar.highlight")); g.drawLine(x + 5,... | private void paintThumbVertical(Graphics g, JComponent c, Rectangle thumbBounds) { int x = thumbBounds.x; int y = thumbBounds.y; int w = thumbBounds.width; int h = thumbBounds.height; // first we fill the background g.setColor(thumbColor); if (isFreeStanding) g.fillRect(x, y, ... | |
layoutContainer(scrollbar); | calculatePreferredSize(); | public Dimension getPreferredSize(JComponent c) { layoutContainer(scrollbar); return preferredSize; } |
this.mask = getMask(actions); | public SocketPermission(String hostport, String actions) { super(hostport); this.hostport = hostport; this.mask = getMask(actions); this.actions = actions; } | |
public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof SocketPermission)) return (false); | public boolean equals(Object obj) { if (! (obj instanceof SocketPermission)) return false; | public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof SocketPermission)) return (false); if (((SocketPermission) obj).hostport.equals(hostport)) if (((SocketPermission) obj).actions.equals(actions)) return (true); ... |
return (true); | return true; | public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof SocketPermission)) return (false); if (((SocketPermission) obj).hostport.equals(hostport)) if (((SocketPermission) obj).actions.equals(actions)) return (true); ... |
return (false); | return false; | public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof SocketPermission)) return (false); if (((SocketPermission) obj).hostport.equals(hostport)) if (((SocketPermission) obj).actions.equals(actions)) return (true); ... |
public String getActions() { final StringBuffer sb = new StringBuffer(); boolean comma = false; | public String getActions() { boolean found = false; StringBuffer sb = new StringBuffer(""); | public String getActions() { final StringBuffer sb = new StringBuffer(); boolean comma = false; if ((mask & CONNECT) != 0) { sb.append("connect"); comma = true; } if ((mask & LISTEN) != 0) { if (comma) sb.append(','); sb.append("listen")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.