rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return vis;
return visible;
public boolean isVisible() { return vis; }
setDot(dot);
this.dot = dot; handleHighlight(); repaint();
public void moveDot(int dot) { setDot(dot); }
g.setColor(color); g.drawLine(x, y, x, y + height);
if (textComponent == null) return; int dot = getDot(); Rectangle rect = null; try { rect = textComponent.modelToView(dot); } catch (BadLocationException e) { return; } if (rect == null) return; if (visible) { g.setColor(textComponent.getCaretColor()); g.drawLine(rect.x, rect.y, rect.x, rect.y + rect.height); }
public void paint(Graphics g) { g.setColor(color); g.drawLine(x, y, x, y + height); }
if (parent != null) parent.repaint();
if (textComponent != null) textComponent.repaint();
protected final void repaint() { if (parent != null) parent.repaint(); }
blink = rate;
blinkRate = rate;
public void setBlinkRate(int rate) { blink = rate; }
this.mark = dot; handleHighlight();
public void setDot(int dot) { this.dot = dot; repaint(); }
magic = p;
magicCaretPosition = p;
public void setMagicCaretPosition(Point p) { magic = p; }
vis_sel = v;
if (selectionVisible == v) return; selectionVisible = v; handleHighlight();
public void setSelectionVisible(boolean v) { vis_sel = v; repaint(); }
vis = v;
visible = v;
public void setVisible(boolean v) { vis = v; repaint(); }
X86CodeGenerator x86cg = new X86CodeGenerator(os, code.getLength());
private static void generateCode(AbstractX86Stream os, String className) throws MalformedURLException, ClassNotFoundException { //VmByteCode code = loadByteCode(className, "arithOptIntx"); //VmByteCode code = loadByteCode(className, "simpleWhile"); VmByteCode code = loadByteCode(className, "terniary2"); ...
System.out.println(cfg);
private static void generateCode(AbstractX86Stream os, String className) throws MalformedURLException, ClassNotFoundException { //VmByteCode code = loadByteCode(className, "arithOptIntx"); //VmByteCode code = loadByteCode(className, "simpleWhile"); VmByteCode code = loadByteCode(className, "terniary2"); ...
cfg.optimize(); cfg.deconstrucSSA(); cfg.fixupAddresses(); BootableHashMap liveVariables = new BootableHashMap();
private static void generateCode(AbstractX86Stream os, String className) throws MalformedURLException, ClassNotFoundException { //VmByteCode code = loadByteCode(className, "arithOptIntx"); //VmByteCode code = loadByteCode(className, "simpleWhile"); VmByteCode code = loadByteCode(className, "terniary2"); ...
System.out.println(qi.next());
Quad q = (Quad) qi.next(); if (!q.isDeadCode()) { q.computeLiveness(liveVariables); System.out.println(q); }
private static void generateCode(AbstractX86Stream os, String className) throws MalformedURLException, ClassNotFoundException { //VmByteCode code = loadByteCode(className, "arithOptIntx"); //VmByteCode code = loadByteCode(className, "simpleWhile"); VmByteCode code = loadByteCode(className, "terniary2"); ...
System.out.println("Live ranges:"); Collection lv = liveVariables.values(); LiveRange[] liveRanges = new LiveRange[lv.size()]; it = lv.iterator(); for (int i=0; i<liveRanges.length; i+=1) { Variable var = (Variable) it.next(); LiveRange range = new LiveRange(var); liveRanges[i] = range; } LinearScanAllocator lsa = new...
private static void generateCode(AbstractX86Stream os, String className) throws MalformedURLException, ClassNotFoundException { //VmByteCode code = loadByteCode(className, "arithOptIntx"); //VmByteCode code = loadByteCode(className, "simpleWhile"); VmByteCode code = loadByteCode(className, "terniary2"); ...
if (stackOffset < 0) { throw new AssertionError("stack offset is invalid!"); }
public int getStackOffset() { if (stackOffset < 0) { stackOffset = idominator.getStackOffset(); } return stackOffset; }
JRootPane rootPane = SwingUtilities.getRootPane(owner); JLayeredPane layeredPane = rootPane.getLayeredPane(); this.layeredPane = layeredPane;
public LightweightPopup(Component owner, Component contents, int x, int y) { super(owner, contents, x, y); this.owner = owner; this.contents = contents; this.x = x; this.y = y; }
JRootPane rootPane = SwingUtilities.getRootPane(owner); JLayeredPane layeredPane = rootPane.getLayeredPane();
public void hide() { JRootPane rootPane = SwingUtilities.getRootPane(owner); JLayeredPane layeredPane = rootPane.getLayeredPane(); layeredPane.remove(panel); }
JRootPane rootPane = SwingUtilities.getRootPane(owner); JLayeredPane layeredPane = rootPane.getLayeredPane();
public void show() { JRootPane rootPane = SwingUtilities.getRootPane(owner); JLayeredPane layeredPane = rootPane.getLayeredPane(); // We insert a JPanel between the layered pane and the contents so we // can fiddle with the setLocation() method without disturbing a // JPopupMenu (which o...
listener = new ComboBoxEditorListener();
public BasicComboBoxEditor() { editor = new JTextField(); editor.setBorder(null); editor.setColumns(9); }
editor.addActionListener(l);
listener.addListener(l);
public void addActionListener(ActionListener l) { editor.addActionListener(l); }
editor.removeActionListener(l);
listener.removeListener(l);
public void removeActionListener(ActionListener l) { editor.removeActionListener(l); }
}
public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.pos = offset; this.endOffset = offset + length; this.length = length; documentEvent = ev; edits...
rootPOA = new gnuPOA(null, "RootPOA", null, policySets.rootPoa(), this);
rootPOA = new gnuPOA(null, "RootPOA", null, StandardPolicies.rootPoa(), this);
public ORB_1_4() { super(); try { rootPOA = new gnuPOA(null, "RootPOA", null, policySets.rootPoa(), this); } catch (InvalidPolicy ex) { // Invalid default policy set. InternalError ierr = new InternalError(); ierr.initCause(ex); throw ierr; } initial...
activeObjectMap.Obj obj = rootPOA.findIorKey(ior.key);
AOM.Obj obj = rootPOA.findIorKey(ior.key);
protected IOR createIOR(cObject ref) throws BAD_OPERATION { IOR ior = super.createIOR(ref); if (iIor != null) { activeObjectMap.Obj obj = rootPOA.findIorKey(ior.key); POA poa; // Null means that the object was connected to the ORB directly. if (obj == null) poa = ro...
activeObjectMap.Obj exists = rootPOA.findObject(forObject);
AOM.Obj exists = rootPOA.findObject(forObject);
public String object_to_string(org.omg.CORBA.Object forObject) { try { return super.object_to_string(forObject); } catch (Exception ex) { try { activeObjectMap.Obj exists = rootPOA.findObject(forObject); if (exists == null) throw new OBJE...
Policy[] all_policies = policySets.withDefault(a_policies);
Policy[] all_policies = StandardPolicies.withDefault(a_policies);
public gnuPOA(gnuPOA a_parent, String a_name, POAManager a_manager, Policy[] a_policies, ORB_1_4 an_orb ) throws InvalidPolicy { // Add default policies. Policy[] all_policies = policySets.withDefault(a_policies); name = a_name; parent = a_parent; m_orb = an_orb; ...
m_policies.add(((vPolicy) s_policies [ i ]).getValue());
m_policies.add(((AccessiblePolicy) s_policies [ i ]).getValue());
public gnuPOA(gnuPOA a_parent, String a_name, POAManager a_manager, Policy[] a_policies, ORB_1_4 an_orb ) throws InvalidPolicy { // Add default policies. Policy[] all_policies = policySets.withDefault(a_policies); name = a_name; parent = a_parent; m_orb = an_orb; ...
public activeObjectMap.Obj findIorKey(byte[] ior_key)
public AOM.Obj findIorKey(byte[] ior_key)
public activeObjectMap.Obj findIorKey(byte[] ior_key) { cdrBufInput in = new cdrBufInput(ior_key); int signature = in.read_long(); if (signature != SIGNATURE) return null; byte[] id = in.read_sequence(); byte[] poa = in.read_sequence(); return findKey(id, poa); }
cdrBufInput in = new cdrBufInput(ior_key);
BufferredCdrInput in = new BufferredCdrInput(ior_key);
public activeObjectMap.Obj findIorKey(byte[] ior_key) { cdrBufInput in = new cdrBufInput(ior_key); int signature = in.read_long(); if (signature != SIGNATURE) return null; byte[] id = in.read_sequence(); byte[] poa = in.read_sequence(); return findKey(id, poa); }
activeObjectMap.Obj obj;
AOM.Obj obj;
public void destroy(boolean etherealize_objects, boolean wait_for_completion) { if (wait_for_completion) waitWhileRunning(); // Put the brake instead of manager, preventing the subsequent // requests. gnuPOAManager g = new gnuPOAManager(); g.state = State.INACTIVE; m_manager = g; // Disconn...
public activeObjectMap.Obj findServant(Servant servant)
public AOM.Obj findServant(Servant servant)
public activeObjectMap.Obj findServant(Servant servant) { activeObjectMap.Obj h = aom.findServant(servant); if (h != null) return h; else { for (int i = 0; i < children.size(); i++) { h = ((gnuPOA) children.get(i)).findServant(servant); if (h != null) ...
activeObjectMap.Obj h = aom.findServant(servant);
AOM.Obj h = aom.findServant(servant);
public activeObjectMap.Obj findServant(Servant servant) { activeObjectMap.Obj h = aom.findServant(servant); if (h != null) return h; else { for (int i = 0; i < children.size(); i++) { h = ((gnuPOA) children.get(i)).findServant(servant); if (h != null) ...
activeObjectMap.Obj exists = null;
AOM.Obj exists = null;
public org.omg.CORBA.Object servant_to_reference(Servant the_Servant) throws ServantNotActive, WrongPolicy { required(ServantRetentionPolicyValue.RETAIN); activeObjectMap.Obj exists = null; if (!applies(IdUniqueness...
byte[] object_key = activeObjectMap.getFreeId();
byte[] object_key = AOM.getFreeId();
public org.omg.CORBA.Object servant_to_reference(Servant the_Servant) throws ServantNotActive, WrongPolicy { required(ServantRetentionPolicyValue.RETAIN); activeObjectMap.Obj exists = null; if (!applies(IdUniqueness...
servantDelegate delegate = new servantDelegate(the_Servant, this, object_key);
ServantDelegateImpl delegate = new ServantDelegateImpl(the_Servant, this, object_key);
public org.omg.CORBA.Object servant_to_reference(Servant the_Servant) throws ServantNotActive, WrongPolicy { required(ServantRetentionPolicyValue.RETAIN); activeObjectMap.Obj exists = null; if (!applies(IdUniqueness...
super(); textComp.addCaretListener(this);
public AccessibleJTextComponent() { // Nothing to do here. }
public void caretUpdate(CaretEvent value0)
public void caretUpdate(CaretEvent e)
public void caretUpdate(CaretEvent value0) { // TODO }
dot = e.getDot();
public void caretUpdate(CaretEvent value0) { // TODO }
public void changedUpdate(DocumentEvent value0)
public void changedUpdate(DocumentEvent e)
public void changedUpdate(DocumentEvent value0) { // TODO }
return null;
return AccessibleRole.TEXT;
public AccessibleRole getAccessibleRole() { return null; // TODO }
return null;
AccessibleStateSet state = super.getAccessibleStateSet(); return state;
public AccessibleStateSet getAccessibleStateSet() { return null; // TODO }
return null;
return this;
public AccessibleText getAccessibleText() { return null; // TODO }
public String getAfterIndex(int value0, int value1)
public String getAfterIndex(int part, int index)
public String getAfterIndex(int value0, int value1) { return null; // TODO }
public String getAtIndex(int value0, int value1)
public String getAtIndex(int part, int index)
public String getAtIndex(int value0, int value1) { return null; // TODO }
public String getBeforeIndex(int value0, int value1)
public String getBeforeIndex(int part, int index)
public String getBeforeIndex(int value0, int value1) { return null; // TODO }
return 0;
dot = textComp.getCaretPosition(); return dot;
public int getCaretPosition() { return 0; // TODO }
return 0;
return textComp.getText().length();
public int getCharCount() { return 0; // TODO }
public AttributeSet getCharacterAttribute(int value0)
public AttributeSet getCharacterAttribute(int index)
public AttributeSet getCharacterAttribute(int value0) { return null; // TODO }
public Rectangle getCharacterBounds(int value0)
public Rectangle getCharacterBounds(int index)
public Rectangle getCharacterBounds(int value0) { return null; // TODO }
public int getIndexAtPoint(Point value0)
public int getIndexAtPoint(Point p)
public int getIndexAtPoint(Point value0) { return 0; // TODO }
return null;
return textComp.getSelectedText();
public String getSelectedText() { return null; // TODO }
return 0;
if (getSelectedText() == null || (textComp.getText().equals(""))) return 0; return textComp.getSelectionEnd();
public int getSelectionEnd() { return 0; // TODO }
return 0;
if (getSelectedText() == null || (textComp.getText().equals(""))) return 0; return textComp.getSelectionStart();
public int getSelectionStart() { return 0; // TODO }
public void insertUpdate(DocumentEvent value0)
public void insertUpdate(DocumentEvent e)
public void insertUpdate(DocumentEvent value0) { // TODO }
public void removeUpdate(DocumentEvent value0)
public void removeUpdate(DocumentEvent e)
public void removeUpdate(DocumentEvent value0) { // TODO }
return null;
return new AccessibleJTextComponent();
public AccessibleContext getAccessibleContext() { return null; }
private void setOutFileName(String outFileName)
void setOutFileName(String outFileName)
private void setOutFileName(String outFileName) { this.outFileName = outFileName; }
public AbstractSurfaceGraphics(Surface surface, int width, int height) { super(width, height); this.surface = surface;
public AbstractSurfaceGraphics(AbstractSurfaceGraphics src) { super(src); this.surface = src.surface;
public AbstractSurfaceGraphics(Surface surface, int width, int height) { super(width, height); this.surface = surface; }
if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); ElementChange ec = changes.getChange(el); if (ec == null)
if (metrics == null)
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
int line = el.getElementIndex(changes.getOffset()); if (changes.getType() == DocumentEvent.EventType.REMOVE && el.getElement(line) == longestLine) { maxLineLength = -1; if (determineMaxLineLength() != alloc.width) preferenceChanged(this, true, false); } damageLineRange(line, line, a, getContainer());
updateMetrics(); preferenceChanged(null, true, true);
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
Element[] removed = ec.getChildrenRemoved(); Element[] newElements = ec.getChildrenAdded();
Element element = getElement(); ElementChange change = changes.getChange(element); if (changes.getType() == DocumentEvent.EventType.INSERT) { boolean linesAdded = true; if (change == null) linesAdded = false; int start; if (linesAdded) start = change.getIndex(); else start = element.getElementIndex(changes.getOff...
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
if (removed == null && newElements == null)
int length = 0; if (linesAdded) length = change.getChildrenAdded().length - 1; int oldMaxLength = (int) maxLineLength; if (longestLine.getEndOffset() < changes.getOffset() || longestLine.getStartOffset() > changes.getOffset() + changes.getLength())
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
int line = getElement().getElementIndex(changes.getOffset()); damageLineRange(line, line, a, getContainer()); return;
findLongestLine(start, start + length); } else { findLongestLine(0, element.getElementCount() - 1);
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
if (removed != null) { for (int i = 0; i < removed.length; i++) if (removed[i].equals(longestLine)) { maxLineLength = -1; if (determineMaxLineLength() != alloc.width) preferenceChanged(this, true, removed.length != newElements.length); ((JTextComponent)getContainer()).repaint(); return; }
preferenceChanged(null, maxLineLength != oldMaxLength, linesAdded); int endLine = start; if (linesAdded) endLine = element.getElementCount() - 1; damageLineRange(start, endLine, a, getContainer()); } else { int oldMaxLength = (int) maxLineLength; if (change != null) { findLongestLine(0, element.getElementCount()...
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
if (newElements == null) { ((JTextComponent)getContainer()).repaint(); return;
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
updateMetrics(); Segment seg = getLineBuffer(); float longestNewLength = 0; Element longestNewLine = null; for (int i = 0; i < newElements.length; i++) { Element child = newElements[i]; int start = child.getStartOffset(); int end = child.getEndOffset() - 1; try { el.getDocument().getText(start, end - start, seg);...
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { // Return early and do no updates if the allocation area is null // (like the RI). if (a == null) return; float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); Ele...
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null)
public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) {
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) throw new FileSystemException("null device!"); this.device = device; closed = false; byte data[]; //points to the byte where the fs metadata parsing has reached long byteIndex; cache = new BlockCache(50,(float)0.75); Dri...
}
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) throw new FileSystemException("null device!"); this.device = device; closed = false; byte data[]; //points to the byte where the fs metadata parsing has reached long byteIndex; cache = new BlockCache(50,(float)0.75); Dri...
long byteIndex; cache = new BlockCache(50,(float)0.75);
long byteIndex;
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) throw new FileSystemException("null device!"); this.device = device; closed = false; byte data[]; //points to the byte where the fs metadata parsing has reached long byteIndex; cache = new BlockCache(50,(float)0.75); Dri...
Driver driver = device.getDriver(); if(driver instanceof IDEDiskPartitionDriver) pdriver = (IDEDiskPartitionDriver)driver;
cache = new BlockCache(50, (float) 0.75);
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) throw new FileSystemException("null device!"); this.device = device; closed = false; byte data[]; //points to the byte where the fs metadata parsing has reached long byteIndex; cache = new BlockCache(50,(float)0.75); Dri...
pdriver.read(byteIndex, data, 0, Superblock.SUPERBLOCK_LENGTH); byteIndex+=Superblock.SUPERBLOCK_LENGTH;
api.read(byteIndex, data, 0, Superblock.SUPERBLOCK_LENGTH); byteIndex += Superblock.SUPERBLOCK_LENGTH;
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) throw new FileSystemException("null device!"); this.device = device; closed = false; byte data[]; //points to the byte where the fs metadata parsing has reached long byteIndex; cache = new BlockCache(50,(float)0.75); Dri...
pdriver.read( byteIndex+i*GroupDescriptor.GROUPDESCRIPTOR_LENGTH, data, 0, GroupDescriptor.GROUPDESCRIPTOR_LENGTH);
api.read(byteIndex + i * GroupDescriptor.GROUPDESCRIPTOR_LENGTH, data, 0, GroupDescriptor.GROUPDESCRIPTOR_LENGTH);
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) throw new FileSystemException("null device!"); this.device = device; closed = false; byte data[]; //points to the byte where the fs metadata parsing has reached long byteIndex; cache = new BlockCache(50,(float)0.75); Dri...
data = new byte[(int)superblock.getBlockSize()]; api.read( byteIndex, data, 0, (int)superblock.getBlockSize()); FSBitmap blockBitmap = new FSBitmap(data); byteIndex += superblock.getBlockSize(); data = new byte[(int)superblock.getBlockSize()]; api.read( byteIndex, data, 0, (int)superblock.getBlockSize()); FSBitmap i...
* * (int)superblock.getBlockSize()); FSBitmap blockBitmap = new FSBitmap(data); byteIndex += superblock.getBlockSize(); * * * inodeBitmap = new FSBitmap(data); byteIndex += superblock.getBlockSize(); * * */
public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) throw new FileSystemException("null device!"); this.device = device; closed = false; byte data[]; //points to the byte where the fs metadata parsing has reached long byteIndex; cache = new BlockCache(50,(float)0.75); Dri...
pdriver.read( nr*blockSize, data, 0, blockSize); result=new Block(data);
api.read(nr * blockSize, data, 0, blockSize); result = new Block(data);
public byte[] getBlock(long nr) throws IOException{ int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)nr); //check if the block has already been retrieved if(cache.containsKey(key)) result=(Block)cache.get(key); else{ byte[] data = new byte[blockSize]; pdriver.read( n...
int end = (next != 0 ? next - 1 : tabCount - 1);
int end = next != 0 ? next - 1 : tabCount - 1;
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
y -= (maxTabHeight - tabRunOverlay);
y -= maxTabHeight - tabRunOverlay;
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
y += (maxTabHeight - tabRunOverlay);
y += maxTabHeight - tabRunOverlay;
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
x -= (maxTabWidth - tabRunOverlay);
x -= maxTabWidth - tabRunOverlay;
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
x += (maxTabWidth - tabRunOverlay);
x += maxTabWidth - tabRunOverlay;
protected void calculateTabRects(int tabPlacement, int tabCount) { Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Dimension size = tabPane.getSize(); // The coordinates of the upper left corner of the tab area. int x; int y; //...
int nextRun = (forward) ? getNextTabRun(currRun) : getPreviousTabRun(currRun);
int nextRun = forward ? getNextTabRun(currRun) : getPreviousTabRun(currRun);
protected int getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward) { int currRun = getRunForTab(tabCount, tabIndex); int offset; int nextRun = (forward) ? getNextTabRun(currRun) : getPreviousTabRun(currRun); if (tabPlacement == SwingConstants.TOP ...
w -= (x - insets.left);
w -= x - insets.left;
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) { int width = tabPane.getWidth(); int height = tabPane.getHeight(); Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); // Calculate coordinates...
h -= (y - insets.top);
h -= y - insets.top;
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) { int width = tabPane.getWidth(); int height = tabPane.getHeight(); Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); // Calculate coordinates...
int end = (next != 0 ? next - 1 : tabCount - 1);
int end = next != 0 ? next - 1 : tabCount - 1;
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai...
protected VmType(String name, String superClassName, AbstractVmClassLoader loader, int accessFlags) {
protected VmType(String name, String superClassName, VmClassLoader loader, int accessFlags) {
protected VmType(String name, String superClassName, AbstractVmClassLoader loader, int accessFlags) { this(name, null, superClassName, loader, false, accessFlags, -1); }
final VmMethod[] mt = this.methodTable; int compileCount = 0; if (mt != null) { final int count = mt.length; for (int i = 0; i < count; i++) { final VmMethod method = mt[i]; if (optLevel > method.getNativeCodeOptLevel()) { loader.compileRuntime(method, optLevel); method.setModifier(true, Modifier.ACC_COMPILED); compile...
return doCompileRuntime(optLevel);
public final synchronized int compileRuntime(int optLevel) { if (!isPrepared()) { throw new IllegalStateException("VmType must have been prepared"); } final VmMethod[] mt = this.methodTable; int compileCount = 0; if (mt != null) { final int count = mt.length; for (int i = 0; i < count; i++) { final VmMet...
if (loader.isCompileRequired()) { compileRuntime(0); }
private synchronized VmType doPrepare() { if (isPrepared()) { return this; } if (isPreparing()) { throw new Error("Recursive prepare in " + getName()); } modifiers |= Modifier.ACC_PREPARING; try { // Step 1a: Load the super class if ((superClass == null) && (superClassName != null)) { setSuperClass((V...
public final AbstractVmClassLoader getLoader() {
public final VmClassLoader getLoader() {
public final AbstractVmClassLoader getLoader() { return loader; }
link();
public void initialize() { if (!Modifier.isInitialized(modifiers)) { doInitialize(); } }
public final static VmType[] initializeForBootImage(AbstractVmClassLoader clc) throws ClassNotFoundException {
public final static VmType[] initializeForBootImage(VmClassLoader clc) throws ClassNotFoundException {
public final static VmType[] initializeForBootImage(AbstractVmClassLoader clc) throws ClassNotFoundException { ObjectClass = (VmNormalClass) clc.loadClass("java.lang.Object", false); CloneableClass = (VmInterfaceClass) clc.loadClass("java.lang.Cloneable", false); SerializableClass = (VmInterfaceClass) clc.loadClass...
public final void resolveCpRefs(AbstractVmClassLoader clc) {
public final void resolveCpRefs(VmClassLoader clc) {
public final void resolveCpRefs(AbstractVmClassLoader clc) { if (!resolvedCpRefs) { prepare(); if (superClass != null) { superClass.resolveCpRefs(clc); } /** * Step 2b: Load the classes of my fields */ final int fcnt = getNoDeclaredFields(); for (int i = 0; i < fcnt; i++) { final VmField fs = ...
if (superClass == null) { throw new IllegalArgumentException("superClass cannot be null"); }
protected void setSuperClass(VmNormalClass superClass) { if (this.superClass == null) { this.superClass = superClass; } else { throw new IllegalArgumentException("Cannot overwrite superClass"); } }
protected synchronized void resolve(AbstractVmClassLoader cl) {
protected synchronized void resolve(VmClassLoader cl) {
protected synchronized void resolve(AbstractVmClassLoader cl) { try { type = new Signature(getSignature(), declaringClass.getLoader()).getType(); } catch (ClassNotFoundException ex) { throw (Error)new NoClassDefFoundError().initCause(ex); } }
protected synchronized void resolve(AbstractVmClassLoader cl) {
protected synchronized void resolve(VmClassLoader cl) {
protected synchronized void resolve(AbstractVmClassLoader cl) { resolveTypes(); }
decrButton = new JButton(); decrButton.setMargin(new Insets(0,0,0,0)); decrButton.setHorizontalAlignment(SwingConstants.CENTER); decrButton.setHorizontalTextPosition(SwingConstants.CENTER); decrButton.setVerticalAlignment(SwingConstants.CENTER); decrButton.setVerticalTextPosition(SwingConstants.CENTER);
if (orientation == SwingConstants.HORIZONTAL) ((BasicArrowButton) decrButton).setDirection(SwingConstants.WEST); else ((BasicArrowButton) decrButton).setDirection(SwingConstants.NORTH);
protected JButton createDecreaseButton(int orientation) { if (decrButton == null) { decrButton = new JButton(); decrButton.setMargin(new Insets(0,0,0,0)); decrButton.setHorizontalAlignment(SwingConstants.CENTER); decrButton.setHorizontalTextPosition(SwingConstants.CENTER); de...
if (orientation == SwingConstants.HORIZONTAL) decrButton.setIcon(leftIcon); else decrButton.setIcon(upIcon);
protected JButton createDecreaseButton(int orientation) { if (decrButton == null) { decrButton = new JButton(); decrButton.setMargin(new Insets(0,0,0,0)); decrButton.setHorizontalAlignment(SwingConstants.CENTER); decrButton.setHorizontalTextPosition(SwingConstants.CENTER); de...
incrButton = new JButton(); incrButton.setMargin(new Insets(0,0,0,0)); incrButton.setHorizontalAlignment(SwingConstants.CENTER); incrButton.setHorizontalTextPosition(SwingConstants.CENTER); incrButton.setVerticalAlignment(SwingConstants.CENTER); incrButton.setVerticalTextPosition(SwingConstants.CENTER);
if (orientation == SwingConstants.HORIZONTAL) ((BasicArrowButton) incrButton).setDirection(SwingConstants.EAST); else ((BasicArrowButton) incrButton).setDirection(SwingConstants.SOUTH);
protected JButton createIncreaseButton(int orientation) { if (incrButton == null) { incrButton = new JButton(); incrButton.setMargin(new Insets(0,0,0,0)); incrButton.setHorizontalAlignment(SwingConstants.CENTER); incrButton.setHorizontalTextPosition(SwingConstants.CENTER); in...
if (orientation == SwingConstants.HORIZONTAL) incrButton.setIcon(rightIcon); else incrButton.setIcon(downIcon);
protected JButton createIncreaseButton(int orientation) { if (incrButton == null) { incrButton = new JButton(); incrButton.setMargin(new Insets(0,0,0,0)); incrButton.setHorizontalAlignment(SwingConstants.CENTER); incrButton.setHorizontalTextPosition(SwingConstants.CENTER); in...
consumer.setPixels(x, y, w, h, model, pixels, offset, scansize);
consumer.setPixels((int) Math.floor(x/rx), (int) Math.floor(y/ry), (int) Math.ceil(w/rx), (int) Math.ceil(h/ry), model, destPixels, 0, destScansize);
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { if (consumer != null) consumer.setPixels(x, y, w, h, model, pixels, offset, scansize); }
while(!stackTrace[index].getClassName().equals(getClass().getName())){index++;}
while(index < stackTrace.length && !stackTrace[index].getClassName().equals(getClass().getName())) index++;
private StackTraceElement getCallerStackFrame() { Throwable t = new Throwable(); StackTraceElement[] stackTrace = t.getStackTrace(); int index = 0; // skip to stackentries until this class while(!stackTrace[index].getClassName().equals(getClass().getName())){index++;} // skip the stackentries of th...
while(stackTrace[index].getClassName().equals(getClass().getName())){index++;}
while(index < stackTrace.length && stackTrace[index].getClassName().equals(getClass().getName())) index++;
private StackTraceElement getCallerStackFrame() { Throwable t = new Throwable(); StackTraceElement[] stackTrace = t.getStackTrace(); int index = 0; // skip to stackentries until this class while(!stackTrace[index].getClassName().equals(getClass().getName())){index++;} // skip the stackentries of th...