rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
Streamable arrayHolder = holderFactory.createHolder(official_type);
Streamable arrayHolder = HolderLocator.createHolder(official_type);
public Any to_any() { try { Streamable memberHolder = holderFactory.createHolder(official_components); if (memberHolder == null) memberHolder = holderFactory.createHolder(final_components); Class memberHolderClass = memberHolder.getClass(); Class memberClass = me...
View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(offs, Position.Bias.Forward, SwingUtilities.calculateInnerArea(c, null), SwingConstants.NORTH, new Position.Bias[1]); return pos;
int offs = getRowStart(c, offset); if(offs == -1) return -1; Point pt = c.modelToView(offs-1).getLocation(); pt.x = x; offs = c.viewToModel(pt); int offsX = c.modelToView(offs).getLocation().x; int offsXNext = c.modelToView(offs+1).getLocation().x; if (Math.abs(offsX-x) < Math.abs(offsXNext-x)) return offs; ...
public static final int getPositionAbove(JTextComponent c, int offset, int x) throws BadLocationException { View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(offs, ...
View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(offs, Position.Bias.Forward, SwingUtilities.calculateInnerArea(c, null), SwingConstants.SOUTH, new Position.Bias[1]); return pos;
int offs = getRowEnd(c, offset); if(offs == -1) return -1; Point pt = c.modelToView(offs+1).getLocation(); pt.x = x; offs = c.viewToModel(pt); if (offs == c.getDocument().getLength()) return offs; int offsX = c.modelToView(offs).getLocation().x; int offsXNext = c.modelToView(offs+1).getLocation().x; if (Mat...
public static final int getPositionBelow(JTextComponent c, int offset, int x) throws BadLocationException { View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(offs, ...
for (pos = p0; pos < s.count; pos++)
for (pos = 0; pos < s.count; pos++)
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
return pos;
return pos + p0;
public static final int getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round) { // At the end of the for loop, this holds the requested model location int pos; int current...
fireTreeNodesChanged(this, getPathToRoot(parent), childIndices, children);
fireTreeNodesChanged(this, getPathToRoot(node), childIndices, children);
public void nodeChanged(TreeNode node) { TreeNode parent = node.getParent(); int[] childIndices = new int[1]; childIndices[0] = getIndexOfChild(parent, node); Object[] children = new Object[1]; children[0] = node; fireTreeNodesChanged(this, getPathToRoot(parent), childIndices, children); }
if (!path.equals(newValue))
Object node = path.getLastPathComponent(); if (node instanceof MutableTreeNode)
public void valueForPathChanged(TreePath path, Object newValue) { if (!path.equals(newValue)) { TreeModelEvent event = new TreeModelEvent(this, path); TreeModelListener[] listeners = getTreeModelListeners(); for (int i = listeners.length - 1; i >= 0; --i) listeners[i].tr...
TreeModelEvent event = new TreeModelEvent(this, path); TreeModelListener[] listeners = getTreeModelListeners();
((MutableTreeNode) node).setUserObject(newValue); int[] ci = null; Object[] c = null; Object[] parentPath = path.getPath(); if (path.getPathCount() > 1) { Object parent = ((TreeNode) node).getParent(); ci = new int[1]; ci[0] = getIndexOfChild(parent, node); node = newValue; path = path.getParentPath().pathByAddingChild...
public void valueForPathChanged(TreePath path, Object newValue) { if (!path.equals(newValue)) { TreeModelEvent event = new TreeModelEvent(this, path); TreeModelListener[] listeners = getTreeModelListeners(); for (int i = listeners.length - 1; i >= 0; --i) listeners[i].tr...
for (int i = listeners.length - 1; i >= 0; --i) listeners[i].treeNodesChanged(event);
fireTreeNodesChanged(this, parentPath, ci, c);
public void valueForPathChanged(TreePath path, Object newValue) { if (!path.equals(newValue)) { TreeModelEvent event = new TreeModelEvent(this, path); TreeModelListener[] listeners = getTreeModelListeners(); for (int i = listeners.length - 1; i >= 0; --i) listeners[i].tr...
this.path = new TreePath(path); this.childIndices = childIndices; this.children = children;
this.path = new TreePath(path);
public TreeModelEvent(Object source, Object[] path, int[] childIndices, Object[] children) { super(source); this.path = new TreePath(path); this.childIndices = childIndices; this.children = children; } // TreeModelEvent()
public abstract Object getChild(Object parent, int index);
Object getChild(Object parent, int index);
public abstract Object getChild(Object parent, int index);
public abstract int getChildCount(Object parent);
int getChildCount(Object parent);
public abstract int getChildCount(Object parent);
public abstract int getIndexOfChild(Object parent, Object child);
int getIndexOfChild(Object parent, Object child);
public abstract int getIndexOfChild(Object parent, Object child);
public abstract void valueForPathChanged(TreePath path, Object newvalue);
void valueForPathChanged(TreePath path, Object newvalue);
public abstract void valueForPathChanged(TreePath path, Object newvalue);
throws NotImplementedException
public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos) { // FIXME: not yet implemented. }
return currentDepth;
int depth = 0; if (stack != null) depth = stack.size(); return depth;
public int depth() { return currentDepth; }
currentElement = root; currentDepth = 0; previousItem = null; return root;
Element first = null; if (root != null) { stack = new Stack(); if (root.getElementCount() > 0) stack.push(new ElementRef(root)); first = root; } return first;
public Element first() { // Reset the iterator. currentElement = root; currentDepth = 0; previousItem = null; return root; }
if (currentElement == null || currentElement == root) return null; return previousItem;
Element previous = null; int stackSize; if (stack != null && (stackSize = stack.size()) > 0) { ElementRef ref = (ElementRef) stack.peek(); Element el = ref.element; int index = ref.index; if (index > 0) { previous = deepestLeaf(el.getElement(--index)); } else if (index == 0) { previous = el; } else if (index == -1) { E...
public Element previous() { if (currentElement == null || currentElement == root) return null; return previousItem; }
AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null"); switch (kind) { case Kind.REGISTER: if (msb != this.lsb) { if (msb != this.msb) { os.writeMOV(INTSIZE, m...
final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack();
final void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != n...
case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break;
assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != null"); assertCondition(msb != null, "msb != null");
final void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != n...
case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break;
switch (kind) { case Kind.REGISTER: if (msb != this.lsb) { if (msb != this.msb) { os.writeMOV(INTSIZE, msb, this.msb); if (lsb != this.msb) { pool.release(this.msb); } } if (lsb != this.lsb) { os.writeMOV(INTSIZE, lsb, this.lsb); pool.release(this.lsb); } } else if (lsb != this.msb) { os.writeMOV(INTSI...
final void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != n...
case Kind.FPUSTACK: notImplemented(); break;
case Kind.LOCAL: os.writeMOV(INTSIZE, lsb, FP, offsetToFP); os.writeMOV(INTSIZE, msb, FP, offsetToFP + 4); break;
final void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != n...
case Kind.STACK: if (VirtualStack.checkOperandStack) { final VirtualStack stack = ec.getVStack(); stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break;
case Kind.CONSTANT: loadToConstant(ec, os, lsb, msb); break;
final void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != n...
} kind = Kind.REGISTER; this.lsb = lsb; this.msb = msb; }
case Kind.FPUSTACK: stack.fpuStack.pop(this); os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); os.writePOP(lsb); os.writePOP(msb); break; case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(lsb); os.writePOP(msb); break; } kind = Kind.REGISTER; this.lsb = lsb; this.msb =...
final void loadTo(EmitterContext ec, Register lsb, Register msb) { AbstractX86Stream os = ec.getStream(); X86RegisterPool pool = ec.getPool(); //os.log("LongItem.log called "+Integer.toString(kind)); assertCondition(lsb != msb, "lsb != msb"); assertCondition(lsb != null, "lsb != n...
notImplemented(); }
assertCondition((getKind() == Kind.REGISTER) && ((this.lsb == reg) || (this.msb == reg)), "spill1"); ec.getVStack().push(ec); if (getKind() == Kind.STACK) { return; } final X86RegisterPool pool = ec.getPool(); final Register newLsb = request(ec, pool); final Register newMsb = request(ec, pool); loadTo(ec, newLsb, newM...
final void spill(EmitterContext ec, Register reg) { notImplemented(); }
{
private BigInteger[] computeRS(final byte[] digestBytes) { final BigInteger p = ((DSAPrivateKey) privateKey).getParams().getP(); final BigInteger q = ((DSAPrivateKey) privateKey).getParams().getQ(); final BigInteger g = ((DSAPrivateKey) privateKey).getParams().getG(); final BigInteger x = ((DSAPrivateKey...
}
private BigInteger[] computeRS(final byte[] digestBytes) { final BigInteger p = ((DSAPrivateKey) privateKey).getParams().getP(); final BigInteger q = ((DSAPrivateKey) privateKey).getParams().getQ(); final BigInteger g = ((DSAPrivateKey) privateKey).getParams().getG(); final BigInteger x = ((DSAPrivateKey...
if (!(k instanceof DSAPrivateKey)) {
if (! (k instanceof DSAPrivateKey))
protected void setupForSigning(PrivateKey k) throws IllegalArgumentException { if (!(k instanceof DSAPrivateKey)) { throw new IllegalArgumentException(); } this.privateKey = k; }
}
protected void setupForSigning(PrivateKey k) throws IllegalArgumentException { if (!(k instanceof DSAPrivateKey)) { throw new IllegalArgumentException(); } this.privateKey = k; }
if (!(k instanceof DSAPublicKey)) {
if (! (k instanceof DSAPublicKey))
protected void setupForVerification(PublicKey k) throws IllegalArgumentException { if (!(k instanceof DSAPublicKey)) { throw new IllegalArgumentException(); } this.publicKey = k; }
}
protected void setupForVerification(PublicKey k) throws IllegalArgumentException { if (!(k instanceof DSAPublicKey)) { throw new IllegalArgumentException(); } this.publicKey = k; }
Dimension pref;
protected int getHeightOfTallestLabel() { int tallest = 0; Component label; if (slider.getLabelTable() == null) return 0; for (Enumeration list = slider.getLabelTable().elements(); list.hasMoreElements();) { Object comp = list.nextElement(); if (! (comp instanceof Component)) continue...
if (label.getHeight() > tallest) tallest = label.getHeight();
pref = label.getPreferredSize(); if (pref != null && pref.height > tallest) tallest = pref.height;
protected int getHeightOfTallestLabel() { int tallest = 0; Component label; if (slider.getLabelTable() == null) return 0; for (Enumeration list = slider.getLabelTable().elements(); list.hasMoreElements();) { Object comp = list.nextElement(); if (! (comp instanceof Component)) continue...
if (label.getWidth() > widest) widest = label.getWidth();
pref = label.getPreferredSize(); if (pref != null && pref.width > widest) widest = pref.width;
protected int getWidthOfWidestLabel() { int widest = 0; Component label; if (slider.getLabelTable() == null) return 0; for (Enumeration list = slider.getLabelTable().elements(); list.hasMoreElements();) { Object comp = list.nextElement(); if (! (comp instanceof Component)) continue; l...
} else if (method.canThrow(PragmaPrivilegedAction.class)) { return;
public static void checkPermission(Permission perm) throws AccessControlException, PragmaCheckPermission { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { //getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPerm...
if (method.canThrow(PragmaPrivilegedAction.class)) { return; }
public static void checkPermission(Permission perm) throws AccessControlException, PragmaCheckPermission { if (!Unsafe.getCurrentProcessor().isThreadSwitchActive()) { //getContext().checkPermission(perm); // This is an optimized version of // getContext().checkPerm...
if (current != null)
void detach() { current.detach(); current = null; DomNode.this.removeEventListener("DOMNodeInserted", this, true); DomNode.this.removeEventListener("DOMNodeRemoved", this, true); }
public Parameter(Any an_argument, ParameterMode a_mode)
public Parameter()
public Parameter(Any an_argument, ParameterMode a_mode) { argument = an_argument; mode = a_mode; }
argument = an_argument; mode = a_mode;
public Parameter(Any an_argument, ParameterMode a_mode) { argument = an_argument; mode = a_mode; }
VmType arrCls;
final String arrClsName = vmClass.getArrayClassName(); final VmType arrCls;
public static Object anewarray(VmMethod currentMethod, VmType vmClass, int elements) throws PragmaUninterruptible { VmType arrCls; try { AbstractVmClassLoader curLoader = currentMethod.getDeclaringClass().getLoader(); arrCls = curLoader.loadClass(vmClass.getArrayClassName(), true); //Screen.debug("an cls{"); ...
AbstractVmClassLoader curLoader = currentMethod.getDeclaringClass().getLoader(); arrCls = curLoader.loadClass(vmClass.getArrayClassName(), true);
final VmClassLoader curLoader = currentMethod.getDeclaringClass().getLoader(); arrCls = curLoader.loadClass(arrClsName, true);
public static Object anewarray(VmMethod currentMethod, VmType vmClass, int elements) throws PragmaUninterruptible { VmType arrCls; try { AbstractVmClassLoader curLoader = currentMethod.getDeclaringClass().getLoader(); arrCls = curLoader.loadClass(vmClass.getArrayClassName(), true); //Screen.debug("an cls{"); ...
throw new NoClassDefFoundError();
throw new NoClassDefFoundError(arrClsName);
public static Object anewarray(VmMethod currentMethod, VmType vmClass, int elements) throws PragmaUninterruptible { VmType arrCls; try { AbstractVmClassLoader curLoader = currentMethod.getDeclaringClass().getLoader(); arrCls = curLoader.loadClass(vmClass.getArrayClassName(), true); //Screen.debug("an cls{"); ...
AbstractVmClassLoader curLoader = VmSystem.getContextClassLoader();
VmClassLoader curLoader = VmSystem.getContextClassLoader();
public static VmType resolveClass(VmConstClass classRef) throws PragmaUninterruptible { if (classRef.isResolved()) { return classRef.getResolvedVmClass(); } else { AbstractVmClassLoader curLoader = VmSystem.getContextClassLoader(); String cname = classRef.getClassName(); try { Class cls = curLoader.asClas...
AbstractVmClassLoader curLoader = currentMethod.getDeclaringClass().getLoader();
VmClassLoader curLoader = currentMethod.getDeclaringClass().getLoader();
public static VmMethod resolveMethod(VmMethod currentMethod, VmConstMethodRef methodRef) throws PragmaUninterruptible { if (!methodRef.getConstClass().isResolved()) { resolveClass(methodRef.getConstClass()); } if (methodRef.isResolved()) { return methodRef.getResolvedVmMethod(); } else { VmType vmClass = met...
if (peer != null) {
if (peer == null)
addNotify(){ if (peer != null) { // This choice of toolkit seems unsatisfying, but I'm not sure // what else to do. peer = getToolkit().createCheckboxMenuItem(this); } super.addNotify ();}
}
addNotify(){ if (peer != null) { // This choice of toolkit seems unsatisfying, but I'm not sure // what else to do. peer = getToolkit().createCheckboxMenuItem(this); } super.addNotify ();}
public final Class getCategory()
public Class getCategory()
public final Class getCategory() { return JobName.class; }
public final String getName()
public String getName()
public final String getName() { return "job-name"; }
protected AccessibleJComboBox(JComboBox component) { super(component); }
protected AccessibleJComboBox() { }
protected AccessibleJComboBox(JComboBox component) { super(component); // TODO } // AccessibleJComboBox()
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJComboBox(this); }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJComboBox();
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJComboBox(this); } // if return accessibleContext; } // getAccessibleContext()
public InvalidParameterSpecException(String msg)
public InvalidParameterSpecException()
public InvalidParameterSpecException(String msg) { super(msg); }
super(msg);
public InvalidParameterSpecException(String msg) { super(msg); }
Restricted_ORB.Singleton.get_primitive_tc(TCKind.tk_short);
OrbRestricted.Singleton.get_primitive_tc(TCKind.tk_short);
public static TypeCode type() { if (typeCode == null) { TypeCode tshort = Restricted_ORB.Singleton.get_primitive_tc(TCKind.tk_short); typeCode = Restricted_ORB.Singleton.create_alias_tc(id(), "Visibility", tshort); } return typeCode; }
Restricted_ORB.Singleton.create_alias_tc(id(), "Visibility", tshort);
OrbRestricted.Singleton.create_alias_tc(id(), "Visibility", tshort);
public static TypeCode type() { if (typeCode == null) { TypeCode tshort = Restricted_ORB.Singleton.get_primitive_tc(TCKind.tk_short); typeCode = Restricted_ORB.Singleton.create_alias_tc(id(), "Visibility", tshort); } return typeCode; }
public synchronized void abortGrabbing() { if (grabbing == true) { grabbing = false; ip.removeConsumer(this);
public synchronized void abortGrabbing() { if (grabbing) { Thread moribund = grabberThread; grabberThread = null; moribund.interrupt(); imageComplete (ImageConsumer.IMAGEABORTED);
public synchronized void abortGrabbing() { if (grabbing == true) { grabbing = false; ip.removeConsumer(this); } }
public synchronized ColorModel getColorModel() { return dstModel;
public synchronized ColorModel getColorModel() { return model;
public synchronized ColorModel getColorModel() { return dstModel; }
public synchronized int getHeight() { return dstHeight;
public synchronized int getHeight() { return height;
public synchronized int getHeight() { return dstHeight; }
public synchronized Object getPixels() { if (intPixels != null) return intPixels; return pixel_bufferb;
public synchronized Object getPixels() { if (ints_delivered) return int_pixel_buffer; else if (bytes_delivered) return byte_pixel_buffer; else return null;
public synchronized Object getPixels() { if (intPixels != null) return intPixels; return pixel_bufferb; }
public synchronized int getStatus() { return status;
public synchronized int getStatus() { return observerStatus;
public synchronized int getStatus() { return status; }
public synchronized int getWidth() { return dstWidth;
public synchronized int getWidth() { return width;
public synchronized int getWidth() { return dstWidth; }
public synchronized void imageComplete(int imageStatus) {
public synchronized void imageComplete(int status) { consumerStatus = status; setObserverStatus ();
public synchronized void imageComplete(int imageStatus) { grabbing = false; switch (imageStatus) { default : case IMAGEERROR : status |= ImageObserver.ERROR | ImageObserver.ABORT; break; case IMAGEABORTED : status |= ImageObserver.ABORT; break; case STATICIMAGEDONE : status |= ImageObserver.AL...
switch (imageStatus) { default : case IMAGEERROR : status |= ImageObserver.ERROR | ImageObserver.ABORT; break; case IMAGEABORTED : status |= ImageObserver.ABORT; break; case STATICIMAGEDONE : status |= ImageObserver.ALLBITS; break; case SINGLEFRAMEDONE : status |= ImageObserver.FRAMEBITS; break; } ip.removeConsumer(thi...
ip.removeConsumer (this); notifyAll ();
public synchronized void imageComplete(int imageStatus) { grabbing = false; switch (imageStatus) { default : case IMAGEERROR : status |= ImageObserver.ERROR | ImageObserver.ABORT; break; case IMAGEABORTED : status |= ImageObserver.ABORT; break; case STATICIMAGEDONE : status |= ImageObserver.AL...
public void setColorModel(ColorModel model) { this.dstModel = model;
public synchronized void setColorModel(ColorModel model) { this.model = model;
public void setColorModel(ColorModel model) { this.dstModel = model; }
public void setDimensions(int width, int height) { System.out.println("setDimension " + width + "," + height); if (dstWidth < 0) { dstWidth = width - dstX; } if (dstHeight < 0) { dstHeight = height - dstY; } if (dstWidth <= 0 || dstHeight <= 0) { imageComplete(STATICIMAGEDONE); } else if (intPixels == null && dstModel ...
public synchronized void setDimensions(int width, int height) { if (this.width < 0) this.width = width - x; if (this.height < 0) this.height = height - y; if (scansize < 0) scansize = this.width; if (int_pixel_buffer == null) int_pixel_buffer = new int[this.width * this.height]; if (byte_pixel_buffer == null)...
public void setDimensions(int width, int height) { System.out.println("setDimension " + width + "," + height); if (dstWidth < 0) { dstWidth = width - dstX; } if (dstHeight < 0) { dstHeight = height - dstY; } if (dstWidth <= 0 || dstHeight <= 0) { imageComplete(STATICIMAGEDONE); } else if (intPixels == nul...
public void setHints(int flags) {
public synchronized void setHints(int flags) { hints = flags;
public void setHints(int flags) { //hints = flags; // FIXME - DO NOT KNOW WHAT TO DO WITH THE HINTS }
public void setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, byte[] pixels, int srcOffset, int srcScansize) {
public synchronized void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { ColorModel currentModel; if (model != null) currentModel = model; else currentModel = this.model;
public void setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, byte[] pixels, int srcOffset, int srcScansize) { if (srcY < dstY) { final int diff = dstY - srcY; if (diff >= srcH) { return; } srcOffset += srcScansize * diff; srcY += diff; srcH -= diff; } if (srcY + srcH > dstY + dstHe...
if (srcY < dstY) { final int diff = dstY - srcY; if (diff >= srcH) { return; } srcOffset += srcScansize * diff; srcY += diff; srcH -= diff;
for(int yp = y; yp < (y + h); yp++) { for(int xp = x; xp < (x + w); xp++) { if(xp >= this.x && yp >= this.y && xp < (this.x + this.width) && yp < (this.y + this.height)) { int i = (yp - this.y) * this.scansize + (xp - this.x) + this.offset; int p = (yp - y) * scansize + (xp - x) + offset; if (forceRGB) { ints_deliver...
public void setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, byte[] pixels, int srcOffset, int srcScansize) { if (srcY < dstY) { final int diff = dstY - srcY; if (diff >= srcH) { return; } srcOffset += srcScansize * diff; srcY += diff; srcH -= diff; } if (srcY + srcH > dstY + dstHe...
if (srcY + srcH > dstY + dstHeight) { srcH = (dstY + dstHeight) - srcY; if (srcH <= 0) { return;
}
public void setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, byte[] pixels, int srcOffset, int srcScansize) { if (srcY < dstY) { final int diff = dstY - srcY; if (diff >= srcH) { return; } srcOffset += srcScansize * diff; srcY += diff; srcH -= diff; } if (srcY + srcH > dstY + dstHe...
if (srcX < dstX) { final int diff = dstX - srcX; if (diff >= srcW) { return; } srcOffset += diff; srcX += diff; srcW -= diff; } if (srcX + srcW > dstX + dstWidth) { srcW = (dstX + dstWidth) - srcX; if (srcW <= 0) { return; } } if (intPixels == null) { intPixels = new int[dstWidth * dstHeight]; dstScansize = dstWidth; ...
public void setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel model, byte[] pixels, int srcOffset, int srcScansize) { if (srcY < dstY) { final int diff = dstY - srcY; if (diff >= srcH) { return; } srcOffset += srcScansize * diff; srcY += diff; srcH -= diff; } if (srcY + srcH > dstY + dstHe...
public void setProperties(Hashtable props) {
public synchronized void setProperties(Hashtable props) { this.props = props;
public void setProperties(Hashtable props) { //this.props = props; //FIXME - DO WE NEED THIS }
ip.startProduction(this);
grabberThread = new Thread () { public void run () { ip.startProduction (PixelGrabber.this); } }; grabberThread.start ();
public synchronized void startGrabbing() { if (grabbing == false) { grabbing = true; ip.startProduction(this); } }
final int count = method.getNoArguments(); for (int i = count - 1; i >= 0; i--) { final int type = method.getArgumentType(i).getJvmType(); final Item v = vstack.pop(JvmType.TypeToContainingType(type)); v.release1(eContext); } if (hasSelf) { RefItem v = vstack.popRef(); v.release1(eContext); } }
final int[] argTypes = JvmType.getArgumentTypes(method.getSignature()); final int count = argTypes.length; for (int i = count - 1; i >= 0; i--) { final int type = argTypes[i]; final Item v = vstack.pop(JvmType.TypeToContainingType(type)); v.release1(eContext); } if (hasSelf) { RefItem v = vstack.popRef(); v.release1(eC...
private final void dropParameters(VmMethod method, boolean hasSelf) { final int count = method.getNoArguments(); for (int i = count - 1; i >= 0; i--) { final int type = method.getArgumentType(i).getJvmType(); final Item v = vstack.pop(JvmType.TypeToContainingType(type)); v.release1(eContext); } if (hasSelf) ...
if (!isconst) { L1AHelper.requestRegister(eContext, ECX, shift); shift.loadTo(eContext, ECX); }
if (!isconst && !shift.uses(ECX)) { L1AHelper.requestRegister(eContext, ECX, shift); shift.loadTo(eContext, ECX); }
private final void ishift(int operation) { final IntItem shift = vstack.popInt(); final boolean isconst = shift.isConstant(); if (!isconst) { L1AHelper.requestRegister(eContext, ECX, shift); shift.loadTo(eContext, ECX); } // Pop & load final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.LOC...
final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.LOCAL);
final IntItem val = vstack.popInt(); val.load(eContext);
private final void ishift(int operation) { final IntItem shift = vstack.popInt(); final boolean isconst = shift.isConstant(); if (!isconst) { L1AHelper.requestRegister(eContext, ECX, shift); shift.loadTo(eContext, ECX); } // Pop & load final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.LOC...
if (val.isLocal()) { final int fpOffset = val.getOffsetToFP(); if (isconst) { final int offset = shift.getValue(); os.writeShift(operation, FP, fpOffset, offset); } else { os.writeShift_CL(operation, FP, fpOffset); } } else { final Register valr = val.getRegister(); if (isconst) { final int offset = shift.getValue(); o...
final Register valr = val.getRegister(); if (isconst) { final int imm8 = shift.getValue(); os.writeShift(operation, valr, imm8); } else { os.writeShift_CL(operation, valr); }
private final void ishift(int operation) { final IntItem shift = vstack.popInt(); final boolean isconst = shift.isConstant(); if (!isconst) { L1AHelper.requestRegister(eContext, ECX, shift); shift.loadTo(eContext, ECX); } // Pop & load final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.LOC...
final IntItem val = vstack.popInt(); val.loadIf(eContext, ~(Item.Kind.CONSTANT | Item.Kind.LOCAL)); if (val.isConstant()) { vstack.push(IntItem.createConst(-val.getValue())); } else if (val.isLocal()) { os.writeNEG(FP, val.getOffsetToFP()); vstack.push(val); } else { os.writeNEG(val.getRegister()); vstack.push(val); } ...
final IntItem val = vstack.popInt(); val.loadIf(eContext, ~Item.Kind.CONSTANT); if (val.isConstant()) { vstack.push(IntItem.createConst(-val.getValue())); } else { os.writeNEG(val.getRegister()); vstack.push(val); } }
public final void visit_ineg() { final IntItem val = vstack.popInt(); val.loadIf(eContext, ~(Item.Kind.CONSTANT | Item.Kind.LOCAL)); if (val.isConstant()) { vstack.push(IntItem.createConst(-val.getValue())); } else if (val.isLocal()) { os.writeNEG(FP, val.getOffsetToFP()); vstack.push(val); } else { os.wr...
final VmType declClass = fieldRef.getResolvedVmField() .getDeclaringClass(); if (!declClass.isInitialized()) { vstack.push(eContext); helper.writeGetStaticsEntry(new Label(curInstrLabel + "$$ic"), scratch, declClass);
final VmType declClass = fieldRef.getResolvedVmField() .getDeclaringClass(); if (!declClass.isInitialized()) {
private final void writeInitializeClass(VmConstFieldRef fieldRef, Register scratch) { // Get fieldRef via constantpool to avoid direct object references in // the native code final VmType declClass = fieldRef.getResolvedVmField() .getDeclaringClass(); if (!declClass.isInitialized()) { // Push all vstac...
final int offset = context.getVmTypeState().getOffset(); os.writeTEST(scratch, offset, VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$aci"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSH(scratch); invokeJavaMethod(context.getVmTypeInitialize()); os.setObjectRef(afterInit); }
vstack.push(eContext);
private final void writeInitializeClass(VmConstFieldRef fieldRef, Register scratch) { // Get fieldRef via constantpool to avoid direct object references in // the native code final VmType declClass = fieldRef.getResolvedVmField() .getDeclaringClass(); if (!declClass.isInitialized()) { // Push all vstac...
}
helper.writeGetStaticsEntry(new Label(curInstrLabel + "$$ic"), scratch, declClass); final int offset = context.getVmTypeState().getOffset(); os.writeTEST(scratch, offset, VmTypeState.ST_INITIALIZED); final Label afterInit = new Label(curInstrLabel + "$$aci"); os.writeJCC(afterInit, X86Constants.JNZ); os.writePUSH(s...
private final void writeInitializeClass(VmConstFieldRef fieldRef, Register scratch) { // Get fieldRef via constantpool to avoid direct object references in // the native code final VmType declClass = fieldRef.getResolvedVmField() .getDeclaringClass(); if (!declClass.isInitialized()) { // Push all vstac...
public ClasspathFontPeer (String name, int style, int size)
public ClasspathFontPeer (String name, Map attrs)
public ClasspathFontPeer (String name, int style, int size) { setStandardAttributes (name, (String)null, style, (float)size, (AffineTransform)null); }
setStandardAttributes (name, (String)null, style, (float)size, (AffineTransform)null);
setStandardAttributes (name, attrs);
public ClasspathFontPeer (String name, int style, int size) { setStandardAttributes (name, (String)null, style, (float)size, (AffineTransform)null); }
if (this.getParent() instanceof JPopupMenu) ((JPopupMenu) this.getParent()).setSelected(this);
if (parent != null && parent instanceof JPopupMenu) ((JPopupMenu) parent).setSelected(this);
public void menuSelectionChanged(boolean changed) { if (changed) { model.setArmed(true); if (this.getParent() instanceof JPopupMenu) ((JPopupMenu) this.getParent()).setSelected(this); } else { model.setArmed(false); if (this.getParent() instanceof JPopupMenu) ((JPopupMenu) this.get...
if (this.getParent() instanceof JPopupMenu) ((JPopupMenu) this.getParent()).getSelectionModel().clearSelection();
if (parent != null && parent instanceof JPopupMenu) ((JPopupMenu) parent).getSelectionModel().clearSelection();
public void menuSelectionChanged(boolean changed) { if (changed) { model.setArmed(true); if (this.getParent() instanceof JPopupMenu) ((JPopupMenu) this.getParent()).setSelected(this); } else { model.setArmed(false); if (this.getParent() instanceof JPopupMenu) ((JPopupMenu) this.get...
StyleSheet styles = getStyleSheet(); if (styles == null) return super.getAttributes(); else return CombinedAttributes.combine(super.getAttributes(), styles.getViewAttributes(this));
if (attributes == null) attributes = getStyleSheet().getViewAttributes(this); return attributes;
public AttributeSet getAttributes() { StyleSheet styles = getStyleSheet(); if (styles == null) return super.getAttributes(); else return CombinedAttributes.combine(super.getAttributes(), styles.getViewAttributes(this)); }
if (imageIcon == null) return null; else return imageIcon.getImage();
updateState(); return image;
public Image getImage() { if (imageIcon == null) return null; else return imageIcon.getImage(); }
Object url = getAttributes().getAttribute(Attribute.SRC); if (url == null) return null;
Element el = getElement(); String src = (String) el.getAttributes().getAttribute(Attribute.SRC); URL url = null; if (src != null) { URL base = ((HTMLDocument) getDocument()).getBase();
public URL getImageURL() { Object url = getAttributes().getAttribute(Attribute.SRC); if (url == null) return null; try { return new URL(url.toString()); } catch (MalformedURLException e) { // The URL is malformed - no image. return null; } }
return new URL(url.toString());
url = new URL(base, src);
public URL getImageURL() { Object url = getAttributes().getAttribute(Attribute.SRC); if (url == null) return null; try { return new URL(url.toString()); } catch (MalformedURLException e) { // The URL is malformed - no image. return null; } }
catch (MalformedURLException e)
catch (MalformedURLException ex)
public URL getImageURL() { Object url = getAttributes().getAttribute(Attribute.SRC); if (url == null) return null; try { return new URL(url.toString()); } catch (MalformedURLException e) { // The URL is malformed - no image. return null; } }
return null;
public URL getImageURL() { Object url = getAttributes().getAttribute(Attribute.SRC); if (url == null) return null; try { return new URL(url.toString()); } catch (MalformedURLException e) { // The URL is malformed - no image. return null; } }
return url; }
public URL getImageURL() { Object url = getAttributes().getAttribute(Attribute.SRC); if (url == null) return null; try { return new URL(url.toString()); } catch (MalformedURLException e) { // The URL is malformed - no image. return null; } }
Object w = attrs.getAttribute(Attribute.WIDTH); if (w != null) return Integer.parseInt(w.toString());
if (spans[axis] != null) return spans[axis].getValue();
public float getPreferredSpan(int axis) { AttributeSet attrs = getAttributes(); Image image = getImage(); if (axis == View.X_AXIS) { Object w = attrs.getAttribute(Attribute.WIDTH); if (w != null) return Integer.parseInt(w.toString()); else if (image != null) r...
Object w = attrs.getAttribute(Attribute.HEIGHT); if (w != null) return Integer.parseInt(w.toString());
if (spans[axis] != null) return spans[axis].getValue();
public float getPreferredSpan(int axis) { AttributeSet attrs = getAttributes(); Image image = getImage(); if (axis == View.X_AXIS) { Object w = attrs.getAttribute(Attribute.WIDTH); if (w != null) return Integer.parseInt(w.toString()); else if (image != null) r...
Rectangle r = bounds.getBounds(); if (imageIcon == null) { reloadImage(true); if (imageIcon != null) { if (imageIcon.getImageLoadStatus() != MediaTracker.COMPLETE)
updateState(); Rectangle r = bounds instanceof Rectangle ? (Rectangle) bounds : bounds.getBounds(); Image image = getImage(); if (image != null)
public void paint(Graphics g, Shape bounds) { Rectangle r = bounds.getBounds(); if (imageIcon == null) { // Loading image on demand, rendering the loading icon so far. reloadImage(true); // The reloadImage sets the imageIcon, unless the URL is broken // or malformed. ...
renderIcon(g, r, getLoadingImageIcon()); imageIcon.setImageObserver(getContainer()); return; }
g.drawImage(image, r.x, r.y, r.width, r.height, observer);
public void paint(Graphics g, Shape bounds) { Rectangle r = bounds.getBounds(); if (imageIcon == null) { // Loading image on demand, rendering the loading icon so far. reloadImage(true); // The reloadImage sets the imageIcon, unless the URL is broken // or malformed. ...
renderIcon(g, r, getNoImageIcon()); return; } } imageState = (byte) imageIcon.getImageLoadStatus(); switch (imageState) { case MediaTracker.ABORTED: case MediaTracker.ERRORED: renderIcon(g, r, getNoImageIcon()); break; case MediaTracker.LOADING: case MediaTracker.COMPLETE: { Image scaled = imageIcon.getImage().get...
Icon icon = getNoImageIcon(); if (icon != null) icon.paintIcon(getContainer(), g, r.x, r.y);
public void paint(Graphics g, Shape bounds) { Rectangle r = bounds.getBounds(); if (imageIcon == null) { // Loading image on demand, rendering the loading icon so far. reloadImage(true); // The reloadImage sets the imageIcon, unless the URL is broken // or malformed. ...
void reloadImage(boolean itsTime)
private void reloadImage()
void reloadImage(boolean itsTime) { URL url = getImageURL(); if (url == null) imageState = (byte) MediaTracker.ERRORED; else if (!(loadOnDemand && !itsTime)) imageIcon = new ImageIcon(url); else imageState = (byte) MediaTracker.LOADING; }
URL url = getImageURL(); if (url == null) imageState = (byte) MediaTracker.ERRORED; else if (!(loadOnDemand && !itsTime)) imageIcon = new ImageIcon(url); else imageState = (byte) MediaTracker.LOADING;
loading = true; reloadImage = false; haveWidth = false; haveHeight = false; image = null; width = 0; height = 0; try { loadImage(); updateSize(); } finally { loading = false; }
void reloadImage(boolean itsTime) { URL url = getImageURL(); if (url == null) imageState = (byte) MediaTracker.ERRORED; else if (!(loadOnDemand && !itsTime)) imageIcon = new ImageIcon(url); else imageState = (byte) MediaTracker.LOADING; }
imageIcon = null;
AttributeSet atts = getAttributes(); StyleSheet ss = getStyleSheet(); float emBase = ss.getEMBase(atts); float exBase = ss.getEXBase(atts); spans[X_AXIS] = (Length) atts.getAttribute(CSS.Attribute.WIDTH); if (spans[X_AXIS] != null) { spans[X_AXIS].setFontBases(emBase, exBase); } spans[Y_AXIS] = (Length) atts.getAttribu...
protected void setPropertiesFromAttributes() { // In the current implementation, nothing is cached yet, unless the image // itself. imageIcon = null; }
if (imageIcon == null) reloadImage(false);
updateState();
public void setSize(float width, float height) { if (imageIcon == null) reloadImage(false); }
public void write(OutputStream out) throws IOException {
public void write(ImageOutputStream out) throws IOException {
public void write(OutputStream out) throws IOException { ByteBuffer buf = ByteBuffer.allocate(SIZE); buf.putShort(0, bfType); // ID buf.putInt(2, (int)(bfSize & (0xFFFFFFFF))); // size buf.putInt(6, 0); // 4 reserved bytes set to zero buf.putInt(2, (int)(bfOffBits & (0xFFFFFFFF))); // size out.write(buf.array()); ...