rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return new gnu.xml.aelfred2.JAXPFactory();
return new gnu.xml.stream.SAXParserFactory();
public static SAXParserFactory newInstance() throws FactoryConfigurationError { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = SAXParserFactory.class.getClassLoader(); } String className = null; int count = 0; do { cl...
public void parse(InputStream stream, DefaultHandler def)
public void parse(InputStream stream, HandlerBase handler)
public void parse(InputStream stream, DefaultHandler def) throws SAXException, IOException { parse (new InputSource (stream), def); }
{ parse (new InputSource (stream), def); }
{ parse (new InputSource (stream), handler); }
public void parse(InputStream stream, DefaultHandler def) throws SAXException, IOException { parse (new InputSource (stream), def); }
if (sr == null) sr = new SizeRequirements(); else { sr.maximum = 0; sr.minimum = 0; sr.preferred = 0; sr.alignment = 0.5F; } int count = getViewCount(); for (int i = 0; i < count; ++i) { View child = getView(i); sr.minimum += child.getMinimumSpan(axis); sr.preferred += child.getPreferredSpan(axis); sr.maximum += chi...
SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getTiledSizeRequirements(childReqs);
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements sr) { if (sr == null) sr = new SizeRequirements(); else { sr.maximum = 0; sr.minimum = 0; sr.preferred = 0; sr.alignment = 0.5F; ...
if (sr == null) sr = new SizeRequirements(); else { sr.maximum = 0; sr.minimum = 0; sr.preferred = 0; sr.alignment = 0.5F; } int count = getViewCount(); int aboveBaseline = 0; int belowBaseline = 0; int aboveBaselineMin = 0; int belowBaselineMin = 0; int aboveBaselineMax = 0; int belowBaselineMax = 0; for (int i = 0...
SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs);
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { if (sr == null) sr = new SizeRequirements(); else { sr.maximum = 0; sr.minimum = 0; sr.preferred = 0; sr.alignment = 0.5F; ...
this.width = width; this.height = height; if (myAxis == X_AXIS) { layoutMajorAxis(width, X_AXIS, offsetsX, spansX); layoutMinorAxis(height, Y_AXIS, offsetsY, spansY); } else { layoutMajorAxis(height, Y_AXIS, offsetsY, spansY); layoutMinorAxis(width, X_AXIS, offsetsX, spansX); }
baselineLayout(width, X_AXIS, offsetsX, spansX); baselineLayout(height, Y_AXIS, offsetsY, spansY);
protected void layout(int width, int height) { this.width = width; this.height = height; if (myAxis == X_AXIS) { layoutMajorAxis(width, X_AXIS, offsetsX, spansX); layoutMinorAxis(height, Y_AXIS, offsetsY, spansY); } else { layoutMajorAxis(height, Y_AXIS, offsetsY, span...
int count = getViewCount(); SizeRequirements[] childReqs = new SizeRequirements[count]; for (int i = 0; i < count; ++i) { View view = getView(i); childReqs[i] = new SizeRequirements((int) view.getMinimumSpan(axis), (int) view.getPreferredSpan(axis), (int) view.getMaximumSpan(axis), view.getAlignment(axis)); }
SizeRequirements[] childReqs = getChildRequirements(axis);
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { // Allocate SizeRequirements for each child view. int count = getViewCount(); SizeRequirements[] childReqs = new SizeRequirements[count]; for (int i = 0; i < count; ++i) { Vi...
int count = getViewCount(); SizeRequirements[] childReqs = new SizeRequirements[count]; for (int i = 0; i < count; ++i) { View view = getView(i); childReqs[i] = new SizeRequirements((int) view.getMinimumSpan(axis), (int) view.getPreferredSpan(axis), (int) view.getMaximumSpan(axis), view.getAlignment(axis)); }
SizeRequirements[] childReqs = getChildRequirements(axis);
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { // Allocate SizeRequirements for each child view. int count = getViewCount(); SizeRequirements[] childReqs = new SizeRequirements[count]; for (int i = 0; i < count; ++i) { Vi...
if (!copy.isEmpty())
public void paint(Graphics g, Shape a) { // Adjust size if the size is changed. Rectangle bounds = a.getBounds(); if (bounds.width != getWidth() || bounds.height != getHeight()) setSize(bounds.width, bounds.height); Rectangle inside = getInsideAllocation(a); Rectangle copy = new Rectangle(inside)...
this.width = (int) width; this.height = (int) height;
public void setSize(float width, float height) { if (this.width != (int) width) layoutChanged(X_AXIS); if (this.height != (int) height) layoutChanged(Y_AXIS); Rectangle outside = new Rectangle(0, 0, this.width, this.height); Rectangle inside = getInsideAllocation(outside); if (!isAllocationV...
public SizeRequirements(int min, int pref, int max, float align) {
public SizeRequirements() {
public SizeRequirements(int min, int pref, int max, float align) { // TODO } // SizeRequirements()
inside.x = alloc.x - insets.left; inside.y = alloc.y - insets.top;
inside.x = alloc.x + insets.left; inside.y = alloc.y + insets.top;
protected Rectangle getInsideAllocation(Shape a) { if (a == null) return null; Rectangle alloc = a.getBounds(); // Initialize the inside allocation rectangle. This is done inside // a synchronized block in order to avoid multiple threads creating // this instance simultanously. Rectangle insid...
public abstract XMLEventWriter createXMLEventWriter(OutputStream stream)
public abstract XMLEventWriter createXMLEventWriter(Result result)
public abstract XMLEventWriter createXMLEventWriter(OutputStream stream) throws XMLStreamException;
public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader)
public static XMLInputFactory newInstance()
public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { ClassLoader loader = classLoader; if (loader == null) { loader = Thread.currentThread().getContextClassLoader(); } if (loader...
ClassLoader loader = classLoader; if (loader == null) { loader = Thread.currentThread().getContextClassLoader(); } if (loader == null) { loader = XMLInputFactory.class.getClassLoader(); } String className = null; int count = 0; do { className = getFactoryClassName(loader, count++); if (className != null) { try { Class ...
return newInstance(null, null);
public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError { ClassLoader loader = classLoader; if (loader == null) { loader = Thread.currentThread().getContextClassLoader(); } if (loader...
return expr._boolean(node, expr.evaluate(node, pos, len));
return Expr._boolean(node, expr.evaluate(node, pos, len));
public boolean matches(Node node, int pos, int len) { Object ret = expr.evaluate(node, pos, len); if (ret instanceof Double) { // Same as [position() = x] return ((Double) ret).intValue() == pos; } return expr._boolean(node, expr.evaluate(node, pos, len)); }
protected AccessibleJSplitPane(JSplitPane component) { super(component); }
protected AccessibleJSplitPane(JSplitPane value0) { super(value0); }
protected AccessibleJSplitPane(JSplitPane component) { super(component); // TODO } // AccessibleJSplitPane()
public AccessibleRole getAccessibleRole() { return AccessibleRole.SPLIT_PANE; }
public AccessibleRole getAccessibleRole() { return null; }
public AccessibleRole getAccessibleRole() { return AccessibleRole.SPLIT_PANE; } // getAccessibleRole()
public JSplitPane() { }
public JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent) { if (newOrientation != HORIZONTAL_SPLIT && newOrientation != VERTICAL_SPLIT) throw new IllegalArgumentException("orientation is invalid."); orientation = newOrientation; continuousLayout = newCon...
public JSplitPane() { // TODO } // JSplitPane()
protected void addImpl(Component value0, Object value1, int value2) { }
protected void addImpl(Component comp, Object constraints, int index) { int left = 0; int right = 1; int div = 2; int place; if (constraints == null) { if (leftComponent == null) constraints = LEFT; else if (rightComponent == null) constraints = RIGHT; } if (constraints instanceof String) { String placement = (String)...
protected void addImpl(Component value0, Object value1, int value2) { // TODO } // addImpl()
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJSplitPane(this); } return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJSplitPane(this); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJSplitPane(this); } // if return accessibleContext; } // getAccessibleContext()
public Component getBottomComponent() { return null; }
public Component getBottomComponent() { return rightComponent; }
public Component getBottomComponent() { return null; // TODO } // getBottomComponent()
public int getDividerLocation() { return 0; }
public int getDividerLocation() { if (ui != null) return ((SplitPaneUI) ui).getDividerLocation(this); else return -1; }
public int getDividerLocation() { return 0; // TODO } // getDividerLocation()
public int getDividerSize() { return 0; }
public int getDividerSize() { return dividerSize; }
public int getDividerSize() { return 0; // TODO } // getDividerSize()
public int getLastDividerLocation() { return 0; }
public int getLastDividerLocation() { return lastDividerLocation; }
public int getLastDividerLocation() { return 0; // TODO } // getLastDividerLocation()
public Component getLeftComponent() { return null; }
public Component getLeftComponent() { return leftComponent; }
public Component getLeftComponent() { return null; // TODO } // getLeftComponent()
public int getMaximumDividerLocation() { return 0; }
public int getMaximumDividerLocation() { if (ui != null) return ((SplitPaneUI) ui).getMaximumDividerLocation(this); else return -1; }
public int getMaximumDividerLocation() { return 0; // TODO } // getMaximumDividerLocation()
public int getMinimumDividerLocation() { return 0; }
public int getMinimumDividerLocation() { if (ui != null) return ((SplitPaneUI) ui).getMinimumDividerLocation(this); else return -1; }
public int getMinimumDividerLocation() { return 0; // TODO } // getMinimumDividerLocation()
public int getOrientation() { return 0; }
public int getOrientation() { return orientation; }
public int getOrientation() { return 0; // TODO } // getOrientation()
public double getResizeWeight() { return 0.0; }
public double getResizeWeight() { return resizeWeight; }
public double getResizeWeight() { return 0.0; // TODO } // getResizeWeight()
public Component getRightComponent() { return null; }
public Component getRightComponent() { return rightComponent; }
public Component getRightComponent() { return null; // TODO } // getRightComponent()
public Component getTopComponent() { return null; }
public Component getTopComponent() { return leftComponent; }
public Component getTopComponent() { return null; // TODO } // getTopComponent()
public String getUIClassID() { return uiClassID; }
public String getUIClassID() { return "SplitPaneUI"; }
public String getUIClassID() { return uiClassID; } // getUIClassID()
public boolean isContinuousLayout() { return false; }
public boolean isContinuousLayout() { return continuousLayout; }
public boolean isContinuousLayout() { return false; // TODO } // isContinuousLayout()
public boolean isOneTouchExpandable() { return false; }
public boolean isOneTouchExpandable() { return oneTouchExpandable; }
public boolean isOneTouchExpandable() { return false; // TODO } // isOneTouchExpandable()
public boolean isValidateRoot() { return false; }
public boolean isValidateRoot() { return true; }
public boolean isValidateRoot() { return false; // TODO } // isValidateRoot()
protected void paintChildren(Graphics value0) { }
protected void paintChildren(Graphics g) { super.paintChildren(g); if (ui != null) ((SplitPaneUI) ui).finishedPaintingChildren(this, g); }
protected void paintChildren(Graphics value0) { // TODO } // paintChildren()
protected String paramString() { return null; }
protected String paramString() { return "JSplitPane"; }
protected String paramString() { return null; // TODO } // paramString()
public void remove(Component value0) { }
public void remove(Component component) { if (component == leftComponent) leftComponent = null; else if (component == rightComponent) rightComponent = null; super.remove(component); }
public void remove(Component value0) { // TODO } // remove()
public void removeAll() { }
public void removeAll() { leftComponent = null; rightComponent = null; super.removeAll(); }
public void removeAll() { // TODO } // removeAll()
public void resetToPreferredSizes() { }
public void resetToPreferredSizes() { if (ui != null) ((SplitPaneUI) ui).resetToPreferredSizes(this); }
public void resetToPreferredSizes() { // TODO } // resetToPreferredSizes()
public void setBottomComponent(Component value0) { }
public void setBottomComponent(Component comp) { if (comp != null) add(comp, BOTTOM); else add(new JButton("right button"), BOTTOM); }
public void setBottomComponent(Component value0) { // TODO } // setBottomComponent()
public void setContinuousLayout(boolean value0) { }
public void setContinuousLayout(boolean newContinuousLayout) { if (newContinuousLayout != continuousLayout) { boolean oldValue = continuousLayout; continuousLayout = newContinuousLayout; firePropertyChange(CONTINUOUS_LAYOUT_PROPERTY, oldValue, continuousLayout); } }
public void setContinuousLayout(boolean value0) { // TODO } // setContinuousLayout()
public void setDividerLocation(double value0) { }
public void setDividerLocation(double proportionalLocation) { if (proportionalLocation > 1 || proportionalLocation < 0) throw new IllegalArgumentException("proportion has to be between 0 and 1."); int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight(); setDividerLocation((int) (proportionalLocation * m...
public void setDividerLocation(double value0) { // TODO } // setDividerLocation()
public void setDividerSize(int value0) { }
public void setDividerSize(int newSize) { if (newSize != dividerSize) { int oldSize = dividerSize; dividerSize = newSize; firePropertyChange(DIVIDER_SIZE_PROPERTY, oldSize, dividerSize); } }
public void setDividerSize(int value0) { // TODO } // setDividerSize()
public void setLastDividerLocation(int value0) { }
public void setLastDividerLocation(int newLastLocation) { if (newLastLocation != lastDividerLocation) { int oldValue = lastDividerLocation; lastDividerLocation = newLastLocation; firePropertyChange(LAST_DIVIDER_LOCATION_PROPERTY, oldValue, lastDividerLocation); } }
public void setLastDividerLocation(int value0) { // TODO } // setLastDividerLocation()
public void setLeftComponent(Component value0) { }
public void setLeftComponent(Component comp) { if (comp != null) add(comp, LEFT); else add(new JButton("left button"), LEFT); }
public void setLeftComponent(Component value0) { // TODO } // setLeftComponent()
public void setOneTouchExpandable(boolean value0) { }
public void setOneTouchExpandable(boolean newValue) { if (newValue != oneTouchExpandable) { boolean oldValue = oneTouchExpandable; oneTouchExpandable = newValue; firePropertyChange(ONE_TOUCH_EXPANDABLE_PROPERTY, oldValue, oneTouchExpandable); } }
public void setOneTouchExpandable(boolean value0) { // TODO } // setOneTouchExpandable()
public void setOrientation(int value0) { }
public void setOrientation(int orientation) { if (orientation != HORIZONTAL_SPLIT && orientation != VERTICAL_SPLIT) throw new IllegalArgumentException("orientation must be one of VERTICAL_SPLIT, HORIZONTAL_SPLIT"); if (orientation != this.orientation) { int oldOrientation = this.orientation; this.orientation = orientat...
public void setOrientation(int value0) { // TODO } // setOrientation()
public void setResizeWeight(double value0) { }
public void setResizeWeight(double value) { resizeWeight = value; }
public void setResizeWeight(double value0) { // TODO } // setResizeWeight()
public void setRightComponent(Component value0) { }
public void setRightComponent(Component comp) { if (comp != null) add(comp, RIGHT); else add(new JButton("right button"), RIGHT); }
public void setRightComponent(Component value0) { // TODO } // setRightComponent()
public void setTopComponent(Component value0) { }
public void setTopComponent(Component comp) { if (comp != null) add(comp, TOP); else add(new JButton("left button"), TOP); }
public void setTopComponent(Component value0) { // TODO } // setTopComponent()
public void updateUI() { setUI((SplitPaneUI) UIManager.get(this)); invalidate(); }
public void updateUI() { setUI((SplitPaneUI) UIManager.getUI(this)); invalidate(); repaint(); }
public void updateUI() { setUI((SplitPaneUI) UIManager.get(this)); invalidate(); } // updateUI()
path[depth] = node;
path[path.length - depth - 1] = node;
protected TreeNode[] getPathToRoot(TreeNode node, int depth) { if (node == null) { if (depth == 0) return null; return new TreeNode[depth]; } TreeNode[] path = getPathToRoot(node.getParent(), depth + 1); path[depth] = node; return path; }
return (parent == null);
return parent == null;
public boolean isRoot() { return (parent == null); }
if (!inDTD) throw new SAXException("attribute decl outside DTD");
public void attributeDecl(String eName, String aName, String type, String mode, String value) throws SAXException { if (interrupted) { return; } DomDoctype doctype = (DomDoctype) ctx; doctype.attributeDecl(eName, aName, type, mode, value); }
if (!inDTD) throw new SAXException("element decl outside DTD");
public void elementDecl(String name, String model) throws SAXException { if (interrupted) { return; } // Ignore fake element declarations generated by ValidationConsumer. // If an element is not really declared in the DTD it will not be // declared in the document model. if (!(ctx ...
{
public void endEntity(String name) throws SAXException { if ("[dtd]".equals(name) || name.charAt(0) == '%') { // Ignore DTD and parameter entities return; } if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".e...
} if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".equals(name)) {
if (PREDEFINED_ENTITIES.contains(name))
public void endEntity(String name) throws SAXException { if ("[dtd]".equals(name) || name.charAt(0) == '%') { // Ignore DTD and parameter entities return; } if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".e...
} Entity entity = popEntity();
EntityReference ref = (EntityReference) ctx; if (!ref.getNodeName().equals(name)) throw new SAXException("expecting end of "+ref.getNodeName()+" entity"); ctx = ctx.getParentNode(); if (ref instanceof DomNode) ((DomNode) ref).makeReadonly();
public void endEntity(String name) throws SAXException { if ("[dtd]".equals(name) || name.charAt(0) == '%') { // Ignore DTD and parameter entities return; } if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".e...
for (Node child = entity.getFirstChild(); child != null; child = child.getNextSibling())
Node child = ref.getFirstChild(); while (child != null)
public void endEntity(String name) throws SAXException { if ("[dtd]".equals(name) || name.charAt(0) == '%') { // Ignore DTD and parameter entities return; } if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".e...
} else { Node entityReference = doc.createEntityReference(name); ctx.appendChild(entityReference);
ctx.removeChild(ref);
public void endEntity(String name) throws SAXException { if ("[dtd]".equals(name) || name.charAt(0) == '%') { // Ignore DTD and parameter entities return; } if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".e...
if (!inDTD) throw new SAXException("external entity decl outside DTD");
public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException { if (interrupted) { return; } DomDoctype doctype = (DomDoctype) ctx; Entity entity = doctype.declareEntity(name, publicId, systemId, null); }
if (!inDTD) throw new SAXException("internal entity decl outside DTD");
public void internalEntityDecl(String name, String value) throws SAXException { if (interrupted) { return; } DomDoctype doctype = (DomDoctype) ctx; Entity entity = doctype.declareEntity(name, null, null, null); if (entity != null) { Node text = doc.createTextNode(value); ...
if (!inDTD) throw new SAXException("notation decl outside DTD");
public void notationDecl(String name, String publicId, String systemId) throws SAXException { if (interrupted) { return; } DomDoctype doctype = (DomDoctype) ctx; doctype.declareNotation(name, publicId, systemId); }
{ ctx = doctype;
public void startEntity(String name) throws SAXException { DocumentType doctype = doc.getDoctype(); if (doctype == null) { throw new SAXException("SAX parser error: " + "reference to entity in undeclared doctype"); } if ("[dtd]".equals(name) || name.charAt(0...
} if ("lt".equals(name) || "gt".equals(name) || "amp".equals(name) || "apos".equals(name) || "quot".equals(name)) {
if (PREDEFINED_ENTITIES.contains(name))
public void startEntity(String name) throws SAXException { DocumentType doctype = doc.getDoctype(); if (doctype == null) { throw new SAXException("SAX parser error: " + "reference to entity in undeclared doctype"); } if ("[dtd]".equals(name) || name.charAt(0...
}
public void startEntity(String name) throws SAXException { DocumentType doctype = doc.getDoctype(); if (doctype == null) { throw new SAXException("SAX parser error: " + "reference to entity in undeclared doctype"); } if ("[dtd]".equals(name) || name.charAt(0...
pushEntity(entity);
EntityReference ref = doc.createEntityReference(name); Node child = ref.getFirstChild(); while (child != null) { Node nextChild = child.getNextSibling(); ref.removeChild(child); child = nextChild; } ctx.appendChild(ref); ctx = ref;
public void startEntity(String name) throws SAXException { DocumentType doctype = doc.getDoctype(); if (doctype == null) { throw new SAXException("SAX parser error: " + "reference to entity in undeclared doctype"); } if ("[dtd]".equals(name) || name.charAt(0...
if (!inDTD) throw new SAXException("unparsed entity decl outside DTD");
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException { if (interrupted) { return; } DomDoctype doctype = (DomDoctype) ctx; Entity entity = doctype.declareEntity(name, publicId, systemId, ...
public String getUIClassID() { return "JLabel"; }
public String getUIClassID() { return "LabelUI"; }
public String getUIClassID() { return "JLabel"; }
pixel = new int[4];
protected AbstractGraphics2D() { transform = new AffineTransform(); background = Color.WHITE; composite = AlphaComposite.SrcOver; stroke = new BasicStroke(); HashMap hints = new HashMap(); hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); ...
}
public void clearRect(int x, int y, int width, int height) { Paint savedForeground = getPaint(); setPaint(getBackground()); //System.err.println("clearRect transform type: " + transform.getType()); fillRect(x, y, width, height); setPaint(savedForeground); }
throw new UnsupportedOperationException("Not yet implemented");
if (isOptimized) rawCopyArea(x, y, width, height, dx, dy); else copyAreaImpl(x, y, width, height, dx, dy);
public void copyArea(int x, int y, int width, int height, int dx, int dy) { // FIXME: Implement this. throw new UnsupportedOperationException("Not yet implemented"); }
AffineTransform t = new AffineTransform(); t.translate(x, y);
translate(x, y);
public void drawGlyphVector(GlyphVector gv, float x, float y) { int numGlyphs = gv.getNumGlyphs(); AffineTransform t = new AffineTransform(); t.translate(x, y);// // TODO: We could use fill(gv.getOutline()), but that seems to be // slightly more inefficient. for (int i = 0; i < numGlyphs; i++) ...
GeneralPath p = new GeneralPath(gv.getGlyphOutline(i)); p.transform(t); fillShape(p, true);
Shape o = gv.getGlyphOutline(i); fillShape(o, true);
public void drawGlyphVector(GlyphVector gv, float x, float y) { int numGlyphs = gv.getNumGlyphs(); AffineTransform t = new AffineTransform(); t.translate(x, y);// // TODO: We could use fill(gv.getOutline()), but that seems to be // slightly more inefficient. for (int i = 0; i < numGlyphs; i++) ...
translate(-x, -y);
public void drawGlyphVector(GlyphVector gv, float x, float y) { int numGlyphs = gv.getNumGlyphs(); AffineTransform t = new AffineTransform(); t.translate(x, y);// // TODO: We could use fill(gv.getOutline()), but that seems to be // slightly more inefficient. for (int i = 0; i < numGlyphs; i++) ...
throw new UnsupportedOperationException("Not yet implemented");
boolean ret = false; Rectangle areaOfInterest = new Rectangle(0, 0, image.getWidth(obs), image.getHeight(obs)); return drawImageImpl(image, xform, obs, areaOfInterest);
public boolean drawImage(Image image, AffineTransform xform, ImageObserver obs) { // FIXME: Implement this. throw new UnsupportedOperationException("Not yet implemented"); }
throw new UnsupportedOperationException("Not yet implemented");
Rectangle areaOfInterest = new Rectangle((int) image.getMinX(), (int) image.getHeight(), (int) image.getWidth(), (int) image.getHeight()); drawRenderableImageImpl(image, xform, areaOfInterest);
public void drawRenderableImage(RenderableImage image, AffineTransform xform) { // FIXME: Implement this. throw new UnsupportedOperationException("Not yet implemented"); }
throw new UnsupportedOperationException("Not yet implemented");
Rectangle areaOfInterest = new Rectangle(image.getMinX(), image.getHeight(), image.getWidth(), image.getHeight()); drawRenderedImageImpl(image, xform, areaOfInterest);
public void drawRenderedImage(RenderedImage image, AffineTransform xform) { // FIXME: Implement this. throw new UnsupportedOperationException("Not yet implemented"); }
}
public void drawString(String text, int x, int y) { FontRenderContext ctx = getFontRenderContext(); GlyphVector gv = font.createGlyphVector(ctx, text.toCharArray()); drawGlyphVector(gv, x, y); }
cCtx.compose(paintRaster, destinationRaster, destinationRaster);
WritableRaster targetChild = destinationRaster.createWritableTranslatedChild(-x0,- y); cCtx.compose(paintRaster, targetChild, targetChild);
protected void fillScanline(PaintContext pCtx, int x0, int x1, int y) { Raster paintRaster = pCtx.getRaster(x0, y, x1 - x0, 1); ColorModel paintColorModel = pCtx.getColorModel(); CompositeContext cCtx = composite.createContext(paintColorModel, getColorModel...
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx)
private void fillScanlineAA(int[] alpha, int x0, int yy, int numPixels, PaintContext pCtx, int offs)
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
Raster paintRaster = pCtx.getRaster(x0, y, numScanlinePixels, 1); System.err.println("paintColorModel: " + pCtx.getColorModel());
Raster paintRaster = pCtx.getRaster(x0, yy, numPixels, 1);
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
int[] pixels = new int[numScanlinePixels + paintRaster.getNumBands()]; pixels = paintRaster.getPixels(x0, y, numScanlinePixels, 1, pixels);
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
int[] components = new int[4];
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
for (int i = 0; i < pixels.length; i++)
Object pixel = null; int[] comps = null; int x1 = x0 + numPixels; for (int x = x0; x < x1; x++)
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
lastAlpha = lastAlphaInt / AA_SAMPLING;
lastAlpha = (double) lastAlphaInt / (double) AA_SAMPLING; alpha[i] = 0;
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
components = cm.getComponents(pixel[i], components, 0); components[0] = (int) (components[0] * lastAlpha); pixel[i] = cm.getDataElement(components, 0);
pixel = paintRaster.getDataElements(x - x0, 0, pixel); comps = cm.getComponents(pixel, comps, 0); if (cm.hasAlpha() && ! cm.isAlphaPremultiplied()) comps[comps.length - 1] *= lastAlpha; else { int max; if (cm.hasAlpha()) max = comps.length - 2; else max = comps.length - 1; for (int j = 0; j < max; j++) comps[j] *= last...
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
aaRaster.setPixels(0, 0, numScanlinePixels, 1, pixels); cCtx.compose(aaRaster, destinationRaster, destinationRaster); updateRaster(destinationRaster, x0, y, numScanlinePixels, 1);
WritableRaster targetChild = destinationRaster.createWritableTranslatedChild(-x0, -yy); cCtx.compose(aaRaster, targetChild, targetChild); updateRaster(destinationRaster, x0, yy, numPixels, 1);
private void fillScanlineAA(int[] alpha, int x0, int y, int numScanlinePixels, PaintContext pCtx) { // FIXME: This doesn't work. Fixit. CompositeContext cCtx = composite.createContext(pCtx.getColorModel(), getColorModel(), ...
antialias = (v == RenderingHints.VALUE_TEXT_ANTIALIAS_ON || v == RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
antialias = (v == RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
protected void fillShape(Shape s, boolean isFont) { // Determine if we need to antialias stuff. boolean antialias = false; if (isFont) { Object v = renderingHints.get(RenderingHints.KEY_TEXT_ANTIALIASING); // We default to antialiasing on for text as long as we have no // good hint...
PathIterator path = s.getPathIterator(getTransform(), 1.0); double[] seg = new double[6]; ArrayList segs = new ArrayList(); double segX = 0.; double segY = 0.; double polyX = 0.; double polyY = 0.; double minX = Integer.MAX_VALUE; double maxX = Integer.MIN_VALUE; double minY = Integer.MAX_VALUE; double maxY = In...
Rectangle2D deviceBounds = new Rectangle2D.Double(); ArrayList segs = getSegments(s, transform, deviceBounds, false); Rectangle2D clipBounds = new Rectangle2D.Double(); ArrayList clipSegs = getSegments(clip, transform, clipBounds, true); segs.addAll(clipSegs); Rectangle2D inclClipBounds = new Rectangle2D.Double(); Rect...
protected void fillShape(Shape s, boolean isFont) { // Determine if we need to antialias stuff. boolean antialias = false; if (isFont) { Object v = renderingHints.get(RenderingHints.KEY_TEXT_ANTIALIASING); // We default to antialiasing on for text as long as we have no // good hint...
fillShapeAntialias(segs, minX, minY, maxX, maxY, userBounds);
fillShapeAntialias(segs, deviceBounds, userBounds, inclClipBounds);
protected void fillShape(Shape s, boolean isFont) { // Determine if we need to antialias stuff. boolean antialias = false; if (isFont) { Object v = renderingHints.get(RenderingHints.KEY_TEXT_ANTIALIASING); // We default to antialiasing on for text as long as we have no // good hint...
rawFillShape(segs, minX, minY, maxX, maxY, userBounds);
fillShapeImpl(segs, deviceBounds, userBounds, inclClipBounds);
protected void fillShape(Shape s, boolean isFont) { // Determine if we need to antialias stuff. boolean antialias = false; if (isFont) { Object v = renderingHints.get(RenderingHints.KEY_TEXT_ANTIALIASING); // We default to antialiasing on for text as long as we have no // good hint...
private void fillShapeAntialias(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds)
private void fillShapeAntialias(ArrayList segs, Rectangle2D deviceBounds2D, Rectangle2D userBounds, Rectangle2D inclClipBounds)
private void fillShapeAntialias(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley...
PaintContext pCtx = paint.createContext(getColorModel(), deviceBounds,
PaintContext pCtx = paint.createContext(ColorModel.getRGBdefault(), deviceBounds,
private void fillShapeAntialias(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley...
int numScanlines = (int) Math.ceil(maxY) - (int) minY; int numScanlinePixels = (int) Math.ceil(maxX) - (int) minX + 1;
int numScanlines = (int) Math.ceil(icMaxY) - (int) icMinY; int numScanlinePixels = (int) Math.ceil(icMaxX) - (int) icMinX + 1;
private void fillShapeAntialias(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley...
int firstLine = (int) minY;
int firstLine = (int) icMinY;
private void fillShapeAntialias(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley...
int firstSubline = (int) (Math.ceil((minY - Math.floor(minY)) * AA_SAMPLING));
int firstSubline = (int) (Math.ceil((icMinY - Math.floor(icMinY)) * AA_SAMPLING));
private void fillShapeAntialias(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley...
for (int y = firstLine; y <= maxY; y++)
for (int y = firstLine; y <= icMaxY; y++)
private void fillShapeAntialias(ArrayList segs, double minX, double minY, double maxX, double maxY, Rectangle2D userBounds) { // This is an implementation of a polygon scanline conversion algorithm // described here: // http://www.cs.berkeley...