rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
VMContainer.invalidateTree(component); VMContainer.invalidateTree(jComponent);
VMAwtAPI.invalidateTree(component); VMAwtAPI.invalidateTree(jComponent);
public void run() { if (b) { jComponent.invalidate(); VMContainer.invalidateTree(component); VMContainer.invalidateTree(jComponent); jComponent.validate(); } jComponent.setVisible(b); ...
private void buildMethodHash(Class cls, boolean build)
protected void buildMethodHash(Class cls, boolean build)
private void buildMethodHash(Class cls, boolean build) { Method[] meths = cls.getMethods(); for (int i = 0; i < meths.length; i++) { /* Don't need to include any java.xxx related stuff */ if (meths[i].getDeclaringClass().getName().startsWith("java.")) { continue; } long hash = RMIHashes....
private Class findStubSkelClass(Class startCls)
protected Class findStubSkelClass(Class startCls)
private Class findStubSkelClass(Class startCls) { Class cls = startCls; while (true) { try { String stubClassname = cls.getName() + "_Stub"; ClassLoader cl = cls.getClassLoader(); Class scls = cl == null ? Class.forName(stubClassname) : cl.loadClass(stubClassname); return cls; //...
private Object getHelperClass(Class cls, String type)
protected Object getHelperClass(Class cls, String type)
private Object getHelperClass(Class cls, String type) { try { String classname = cls.getName(); ClassLoader cl = cls.getClassLoader(); Class scls = cl == null ? Class.forName(classname + type) : cl.loadClass(classname + type); if (type.equals("_Stub")) { try ...
this(in);
super (in);
public CipherInputStream(InputStream in, Cipher cipher) { this(in); this.cipher = cipher; if (!(isStream = cipher.getBlockSize() == 1)) { inBuffer = new byte[2][]; inBuffer[0] = new byte[cipher.getBlockSize()]; inBuffer[1] = new byte[cipher.getBlockSize()]; inLength = 0; ...
if (!(isStream = cipher.getBlockSize() == 1)) { inBuffer = new byte[2][]; inBuffer[0] = new byte[cipher.getBlockSize()]; inBuffer[1] = new byte[cipher.getBlockSize()]; inLength = 0; outBuffer = new byte[cipher.getBlockSize()]; outOffset = outLength = 0; state = VIRGIN; }
isStream = cipher.getBlockSize () == 1; eof = false; if (Configuration.DEBUG) logger.log (Component.CRYPTO, "I am born; cipher: {0}, stream? {1}", new Object[] { cipher.getAlgorithm (), Boolean.valueOf (isStream) });
public CipherInputStream(InputStream in, Cipher cipher) { this(in); this.cipher = cipher; if (!(isStream = cipher.getBlockSize() == 1)) { inBuffer = new byte[2][]; inBuffer[0] = new byte[cipher.getBlockSize()]; inBuffer[1] = new byte[cipher.getBlockSize()]; inLength = 0; ...
return outLength - outOffset;
if (outBuffer == null || outOffset >= outBuffer.length) nextBlock (); return outBuffer.length - outOffset;
public int available() throws IOException { if (isStream) return super.available(); return outLength - outOffset; }
public void close() throws IOException
public synchronized void close() throws IOException
public void close() throws IOException { super.close(); }
byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false;
byte[] buf = new byte[cipher.getBlockSize ()]; if (Configuration.DEBUG) logger.log (Component.CRYPTO, "getting a new data block");
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
if (state == VIRGIN || state == LIVING) { do
try
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
int l = in.read(inBuffer[1], count, inBuffer[1].length - count);
outBuffer = null; outOffset = 0; while (outBuffer == null) { int l = in.read (buf); if (Configuration.DEBUG) logger.log (Component.CRYPTO, "we read {0} bytes", Integer.valueOf (l));
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
break; } count += l; } while (count < inBuffer[1].length);
return;
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
try { switch (state) { case VIRGIN: state = LIVING; nextBlock(); break; case LIVING: if (eof) { if (count > 0) { outOffset = cipher.update(inBuffer[0], 0, inLength, outBuffer, 0); state = DYING; } else { outOffset = cipher.doFinal(inBuffer[0], 0, inLength, outBuffer, 0); state = DEAD; }
outOffset = 0; outBuffer = cipher.update (buf, 0, l);
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
else { outOffset = cipher.update(inBuffer[0], 0, inLength, outBuffer, 0); } break; case DYING: outOffset = cipher.doFinal(inBuffer[0], 0, inLength, outBuffer, 0); state = DEAD; break; case DEAD: } } catch (ShortBufferException sbe) { throw new IOException(sbe.toString());
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
throw new IOException(bpe.toString());
IOException ioe = new IOException ("bad padding"); ioe.initCause (bpe); throw ioe;
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
throw new IOException(ibse.toString());
IOException ioe = new IOException ("illegal block size"); ioe.initCause (ibse); throw ioe;
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
inLength = count;
finally { if (Configuration.DEBUG) logger.log (Component.CRYPTO, "decrypted {0} bytes for reading", Integer.valueOf (outBuffer.length)); }
private void nextBlock() throws IOException { byte[] temp = inBuffer[0]; inBuffer[0] = inBuffer[1]; inBuffer[1] = temp; int count = 0; boolean eof = false; if (state == VIRGIN || state == LIVING) { do { int l = in.read(inBuffer[1], count, inBuffer[1].length - count);...
public int read() throws IOException
public synchronized int read() throws IOException
public int read() throws IOException { if (isStream) { byte[] buf = new byte[1]; int in = super.read(); if (in == -1) return -1; buf[0] = (byte) in; try { cipher.update(buf, 0, 1, buf, 0); } catch (ShortBufferException shouldNotH...
if (state == DEAD) return -1; if (available() == 0) nextBlock(); if (state == DEAD) return -1; return outBuffer[outOffset++] & 0xFF;
if (outBuffer == null || outOffset == outBuffer.length) { if (eof) return -1; nextBlock (); } return outBuffer [outOffset++] & 0xFF;
public int read() throws IOException { if (isStream) { byte[] buf = new byte[1]; int in = super.read(); if (in == -1) return -1; buf[0] = (byte) in; try { cipher.update(buf, 0, 1, buf, 0); } catch (ShortBufferException shouldNotH...
if (bytes > 0 && available() > 0)
if (bytes > 0 && outBuffer != null && outOffset >= outBuffer.length)
public long skip(long bytes) throws IOException { if (isStream) { return super.skip(bytes); } long ret = 0; if (bytes > 0 && available() > 0) { ret = available(); outOffset = outLength = 0; } return ret; }
ret = available(); outOffset = outLength = 0;
ret = outBuffer.length - outOffset; outOffset = outBuffer.length;
public long skip(long bytes) throws IOException { if (isStream) { return super.skip(bytes); } long ret = 0; if (bytes > 0 && available() > 0) { ret = available(); outOffset = outLength = 0; } return ret; }
Object val = (arg == null) ? null : arg.evaluate(context, pos, len);
Object val = (arg == null) ? Collections.singleton(context) : arg.evaluate(context, pos, len);
public Object evaluate(Node context, int pos, int len) { Object val = (arg == null) ? null : arg.evaluate(context, pos, len); return _local_name(context, (Collection) val); }
"List.font", new FontUIResource("Dialog", Font.PLAIN, 12),
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractU...
if (event.isKeyPressed()) { l.keyPressed(event); } else if (event.isKeyReleased()) { l.keyReleased(event);
try { if (event.isKeyPressed()) { l.keyPressed(event); } else if (event.isKeyReleased()) { l.keyReleased(event); } } catch (Throwable ex) { log.error("Exception in KeyboardListener", ex);
public synchronized void fireEvent(KeyboardEvent event) { if (event != null) { for (Iterator i = listeners.iterator(); i.hasNext();) { KeyboardListener l = (KeyboardListener) i.next(); if (event.isKeyPressed()) { l.keyPressed(event); } else if (event.isKeyReleased()) { l.keyReleased(event); } ...
if (accelerator != null)
protected void configurePropertiesFromAction(Action action) { super.configurePropertiesFromAction(action); if (! (this instanceof JMenu) && action != null) { setAccelerator((KeyStroke) (action.getValue(Action.ACCELERATOR_KEY))); super.registerKeyboardAction(action, accelerator, ...
final int MIN_LENGTH = 1024;
final int MAX_LENGTH = 1024;
public String readLine() throws IOException { if (eof) { return null; } do { if (blockReads) { // Use mark and reset to read chunks of bytes final int MIN_LENGTH = 1024; int len, pos; len = in.available(); ...
len = (len < MIN_LENGTH) ? MIN_LENGTH : len;
if (len == 0 || len > MAX_LENGTH) len = MAX_LENGTH;
public String readLine() throws IOException { if (eof) { return null; } do { if (blockReads) { // Use mark and reset to read chunks of bytes final int MIN_LENGTH = 1024; int len, pos; len = in.available(); ...
StringSeqHolder h = new StringSeqHolder(); h._read(input); return h.value;
String[] value = new String[ input.read_long() ]; for (int i = 0; i < value.length; i++) value [ i ] = input.read_wstring(); return value;
public static String[] read(InputStream input) { StringSeqHolder h = new StringSeqHolder(); h._read(input); return h.value; }
StringSeqHolder h = new StringSeqHolder(value); h._write(output);
output.write_long(value.length); for (int i = 0; i < value.length; i++) output.write_wstring(value [ i ]);
public static void write(OutputStream output, String[] value) { StringSeqHolder h = new StringSeqHolder(value); h._write(output); }
public Object clone() { try { return super.clone(); } catch (Exception e) { System.err.println("Huuuhhh, this class implements cloneable !!!!!!"); System.err.println("I think there is a bug in this JVM somewhere"); } return null;
public Object clone() { try { return super.clone(); } catch (Exception e) { System.err.println("Huuuhhh, this class implements cloneable !!!!!!"); System.err.println("I think there is a bug in this JVM somewhere");
public Object clone() { try { return super.clone(); } catch (Exception e) { System.err.println("Huuuhhh, this class implements cloneable !!!!!!"); System.err.println("I think there is a bug in this JVM somewhere"); } return null; }
return null; }
public Object clone() { try { return super.clone(); } catch (Exception e) { System.err.println("Huuuhhh, this class implements cloneable !!!!!!"); System.err.println("I think there is a bug in this JVM somewhere"); } return null; }
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75);
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO);
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); //groupDescriptorLock = new Object(); //superblockLock = new Object(); }
}
blockCache = new BlockCache(50, (float) 0.75); inodeCache = new INodeCache(50, (float) 0.75); }
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); //groupDescriptorLock = new Object(); //superblockLock = new Object(); }
INodeTable iNodeTable = iNodeTables[0]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INodeDescriptor(iNodeTable, iNodeNr, 0, iNodeNr-1)); int rights = 0xFFFF & (Ext2Constants.EXT2_S_IRWXU | Ext2Constants.EXT2_S_IRWXG | Ext2Constants.EXT2_S_IRWXO); iNode.create( Ext2Constants.EXT2_S_IFDI...
INodeTable iNodeTable = iNodeTables[0]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INodeDescriptor(iNodeTable, iNodeNr, 0, iNodeNr - 1)); int rights = 0xFFFF & (Ext2Constants.EXT2_S_IRWXU | Ext2Constants.EXT2_S_IRWXG | Ext2Constants.EXT2_S_IRWXO); iNode.create(Ext2Constants.EXT2_S_IFD...
protected FSEntry buildRootEntry() throws IOException { //a free inode has been found: create the inode and write it into the inode table INodeTable iNodeTable = iNodeTables[0]; //byte[] iNodeData = new byte[INode.INODE_LENGTH]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INode...
modifyUsedDirsCount(0, 1); Ext2Entry rootEntry = new Ext2Entry(iNode,"/",Ext2Constants.EXT2_FT_DIR, this, null); ((Ext2Directory)rootEntry.getDirectory()).addINode(Ext2Constants.EXT2_ROOT_INO, ".", Ext2Constants.EXT2_FT_DIR); ((Ext2Directory)rootEntry.getDirectory()).addINode(Ext2Constants.EXT2_ROOT_INO, "..", Ext2Co...
synchronized (inodeCache) { inodeCache.put(new Integer(Ext2Constants.EXT2_ROOT_INO), iNode); } modifyUsedDirsCount(0, 1); Ext2Entry rootEntry = new Ext2Entry(iNode, "/", Ext2Constants.EXT2_FT_DIR, this, null); ((Ext2Directory) rootEntry.getDirectory()).addINode( Ext2Constants.EXT2_ROOT_INO, ".", Ext2Constants.EXT2_FT...
protected FSEntry buildRootEntry() throws IOException { //a free inode has been found: create the inode and write it into the inode table INodeTable iNodeTable = iNodeTables[0]; //byte[] iNodeData = new byte[INode.INODE_LENGTH]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INode...
try{ superblock = new Superblock(); superblock.create(blockSize, this); groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupDescriptors = new GroupDescriptor[groupCount];
try { superblock = new Superblock(); superblock.create(blockSize, this);
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
iNodeTables = new INodeTable[groupCount]; for(int i=0; i<groupCount; i++) { groupDescriptors[i]=new GroupDescriptor(); groupDescriptors[i].create(i, this); } for(int i=0; i<groupCount; i++) { log.debug("creating gropup "+i); byte[] blockBitmap = new byte[blockSize]; byte[] inodeBitmap = new byte[blockSize]; lo...
groupCount = (int) Math.ceil((double) superblock.getBlocksCount() / (double) superblock.getBlocksPerGroup()); groupDescriptors = new GroupDescriptor[groupCount];
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
writeBlock(groupDescriptors[i].getBlockBitmap(), blockBitmap, false); writeBlock(groupDescriptors[i].getInodeBitmap(), inodeBitmap, false); } log.info("superblock.getBlockSize(): "+superblock.getBlockSize());
iNodeTables = new INodeTable[groupCount];
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
buildRootEntry(); flush();
for (int i = 0; i < groupCount; i++) { groupDescriptors[i] = new GroupDescriptor(); groupDescriptors[i].create(i, this); }
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
}catch (IOException ioe) { throw new FileSystemException("Unable to create filesystem", ioe); } }
for (int i = 0; i < groupCount; i++) { log.debug("creating gropup " + i); byte[] blockBitmap = new byte[blockSize]; byte[] inodeBitmap = new byte[blockSize]; long iNodeTableBlock = groupDescriptors[i].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); int metadataLength...
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferredBlockBrou...
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if (preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group " + preferredBlockBroup + " does not exist");
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferr...
log.debug("** NEW INODE ALLOCATED: inode number: "+iNode.getINodeNr()); synchronized(inodeCache) { Integer key = new Integer(iNodeNr); if(inodeCache.containsKey(key)) throw new FileSystemException("Newly allocated inode is already in the inode cache!?"); else inodeCache.put(key, iNode); } return iNode; }
int groupNr = preferredBlockBroup; INodeReservation res = findFreeINode(groupNr); if (!res.isSuccessful()) { for (groupNr = 0; groupNr < superblock.getBlockGroupNr(); groupNr++) { res = findFreeINode(groupNr); if (res.isSuccessful()) { break; } } } if (!res.isSuccessful()) throw new FileSystemException("No free in...
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferr...
try{ return new Ext2Entry( getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR, this, null ); }catch(FileSystemException e) { throw new IOException(e); } }
try { return new Ext2Entry(getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR, this, null); } catch (FileSystemException ex) { final IOException ioe = new IOException(); ioe.initCause(ex); throw ioe; } }
public FSEntry createRootEntry() throws IOException { try{ return new Ext2Entry( getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR, this, null ); }catch(FileSystemException e) { throw new IOException(e); } }
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); long iNodeTableBlock = groupDescriptors[group].getInodeTable(); l...
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException { GroupDescriptor gdesc = groupDescriptors[group]; if (gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc .getFreeBlocksCount());
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
BlockReservation result;
long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); int metadataLength = (int) (firstNonMetadataBlock - (superblock .getFirstDataBlock() + group * superblock.getBlocksPerGroup())); log.debug("group[" + group + "].getInodeTable(...
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
synchronized(blockCache) { byte[] bitmapBlock = getBlock(gdesc.getBlockBitmap()); synchronized( bitmapBlock ) { result=BlockBitmap.findFreeBlocks( bitmapBlock, metadataLength ); if(result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmapBlock, true); modifyFreeBlocksCount( group, -1-r...
BlockReservation result; synchronized (blockCache) { byte[] bitmapBlock = getBlock(gdesc.getBlockBitmap()); synchronized (bitmapBlock) { result = BlockBitmap .findFreeBlocks(bitmapBlock, metadataLength); if (result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmapBlock, true); ...
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
log.info("Flushing the contents of the filesystem"); synchronized(inodeCache) { try{ log.debug("inodecache size: "+inodeCache.size()); Iterator iterator = inodeCache.values().iterator(); while(iterator.hasNext()) { INode iNode = (INode)iterator.next(); iNode.flush(); log.debug("flush(): inodeCache.values().iterator()....
log.info("Flushing the contents of the filesystem"); synchronized (inodeCache) { try { log.debug("inodecache size: " + inodeCache.size()); Iterator iterator = inodeCache.values().iterator(); while (iterator.hasNext()) { INode iNode = (INode) iterator.next(); iNode.flush(); log .debug("flush(): inodeCache.values().iter...
public void flush() throws IOException { log.info("Flushing the contents of the filesystem"); //update the inodes synchronized(inodeCache) { try{ log.debug("inodecache size: "+inodeCache.size()); Iterator iterator = inodeCache.values().iterator(); while(iterator.hasNext()) { INode iNode = (INode)iter...
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gdesc = grou...
public void freeBlock(long blockNr) throws FileSystemException, IOException { if (blockNr < 0 || blockNr >= superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block (" + blockNr + ")");
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if(blockNr<firstNonMetadataBlock) throw new FileSystemException("Attempt to free a filesystem metadata block!");
int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gdesc = groupDescriptors[group];
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
synchronized(blockCache) { byte[] bitmap = getBlock(gdesc.getBlockBitmap()); synchronized( bitmap ) { BlockBitmap.freeBit( bitmap, index ); writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, 1); } } }
long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if (blockNr < firstNonMetadataBlock) throw new FileSystemException( "Attempt to free a filesystem metadata block!"); synchronized (blockCache) { byte[] bitmap = getBlock(...
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer(iNodeNr); log.debug("iNodeCache size: "+inodeCache.si...
public INode getINode(int iNodeNr) throws IOException, FileSystemException { if ((iNodeNr < 1) || (iNodeNr > superblock.getINodesCount())) throw new FileSystemException("INode number (" + iNodeNr + ") out of range (0-" + superblock.getINodesCount() + ")");
public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer(iNodeNr); log.debug("iNodeCache size: "+inod...
int group = (int) ((iNodeNr - 1) / superblock.getINodesPerGroup()); int index = (int) ((iNodeNr - 1) % superblock.getINodesPerGroup());
Integer key = new Integer(iNodeNr);
public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer(iNodeNr); log.debug("iNodeCache size: "+inod...
INodeTable iNodeTable = iNodeTables[group]; INode result = new INode(this, new INodeDescriptor(iNodeTable, iNodeNr, group, index)); result.read(iNodeTable.getInodeData(index)); synchronized(inodeCache) { if(!inodeCache.containsKey(key)) { inodeCache.put(key, result); return result; } else return (INode)inodeCache.get...
log.debug("iNodeCache size: " + inodeCache.size()); synchronized (inodeCache) { if (inodeCache.containsKey(key)) return (INode) inodeCache.get(key); } int group = (int) ((iNodeNr - 1) / superblock.getINodesPerGroup()); int index = (int) ((iNodeNr - 1) % superblock.getINodesPerGroup()); INodeTable iNodeTable = i...
public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer(iNodeNr); log.debug("iNodeCache size: "+inod...
getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); superblock = new Superblock(); superblock.read(data, this); groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupDescriptors = new GroupDescriptor[groupCount]; iNodeTables = new INodeTable[groupCoun...
getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); superblock = new Superblock(); superblock.read(data, this);
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
if( hasROFeature(Ext2Constants.EXT2_FEATURE_RO_COMPAT_LARGE_FILE)) { log.info(getDevice().getId()+" Unsupported filesystem feature (LARGE_FILE) forces readonly mode"); setReadOnly(true); } if( hasROFeature(Ext2Constants.EXT2_FEATURE_RO_COMPAT_BTREE_DIR)) { log.info(getDevice().getId()+" Unsupported filesystem feature (...
groupCount = (int) Math.ceil((double) superblock.getBlocksCount() / (double) superblock.getBlocksPerGroup()); groupDescriptors = new GroupDescriptor[groupCount]; iNodeTables = new INodeTable[groupCount]; for (int i = 0; i < groupCount; i++) { groupDescriptors[i] = new GroupDescriptor(); groupDescriptors[i].read(i, th...
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this); if(blockNr<firstNonMetadataBlock) return new BlockReservation(false, -1, -1);
long iNodeTableBlock = groupDescriptors[group].getInodeTable(); long firstNonMetadataBlock = iNodeTableBlock + INodeTable.getSizeInBlocks(this);
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
synchronized(blockCache) { byte[] bitmap= getBlock(groupDescriptors[group].getBlockBitmap()); synchronized( bitmap) { BlockReservation result = BlockBitmap.testAndSetBlock( bitmap, index ); if(result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, -1-...
if (blockNr < firstNonMetadataBlock) return new BlockReservation(false, -1, -1);
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
}
synchronized (blockCache) { byte[] bitmap = getBlock(groupDescriptors[group].getBlockBitmap()); synchronized (bitmap) { BlockReservation result = BlockBitmap.testAndSetBlock(bitmap, index); if (result.isSuccessful()) { writeBlock(groupDescriptors[group].getBlockBitmap(), bitmap, false); modifyFreeBlocksCount(group, -1...
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.getBlockSize(); synchronized(blockCache) { if(blockCache.containsKey(key)) { block = (Block)blockCache.get(key); block.setData(data); if(forceWrite || S...
if (isReadOnly()) throw new ReadOnlyFileSystemException( "Filesystem is mounted read-only!");
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
log.debug("writing block "+nr+" to disk"); } else block.setDirty(true); } else { getApi().write(nr*blockSize, data, 0, blockSize); } } }
Block block; Integer key = new Integer((int) nr); int blockSize = superblock.getBlockSize(); synchronized (blockCache) { if (blockCache.containsKey(key)) { block = (Block) blockCache.get(key); block.setData(data); if (forceWrite || SYNC_WRITE) { getApi().write(nr * blockSize, data, 0, blockSize); block.setDirty(fa...
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
ProcessingInstructionNode(TemplateNode children, TemplateNode next, String name)
ProcessingInstructionNode(String name)
ProcessingInstructionNode(TemplateNode children, TemplateNode next, String name) { super(children, next); this.name = name; }
super(children, next);
ProcessingInstructionNode(TemplateNode children, TemplateNode next, String name) { super(children, next); this.name = name; }
return new ProcessingInstructionNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), name);
TemplateNode ret = new ProcessingInstructionNode(name); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret;
TemplateNode clone(Stylesheet stylesheet) { return new ProcessingInstructionNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), ...
throws NotImplementedException
protected void AdjustForGravity (GridBagConstraints gbc, Rectangle rect) { // FIXME throw new Error ("Not implemented"); }
throw new AssertionError("The parent of a View must not be null.");
return null; else
public Container getContainer() { View parent = getParent(); if (parent == null) throw new AssertionError("The parent of a View must not be null."); return parent.getContainer(); }
final Item res;
final DoubleWordItem res;
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT);
res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister();
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
res = createReg(getType(), lsb, msb); pool.transferOwnerTo(lsb, res); pool.transferOwnerTo(msb, res);
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
final ArrayList list = new ArrayList(cnt);
final ArrayList<Class> list = new ArrayList<Class>(cnt);
public Class[] getExceptionTypes() { if (exceptionTypes == null) { final VmExceptions exceptions = vmMethod.getExceptions(); final int cnt = exceptions.getLength(); final ArrayList list = new ArrayList(cnt); for (int i = 0; i < cnt; i++) { try { list.add(exceptions.getException(i).getRe...
ArrayList list = new ArrayList(cnt);
ArrayList<Class> list = new ArrayList<Class>(cnt);
public Class[] getParameterTypes() { if (parameterTypes == null) { int cnt = vmMethod.getNoArguments(); ArrayList list = new ArrayList(cnt); for (int i = 0; i < cnt; i++) { list.add(vmMethod.getArgumentType(i).asClass()); } parameterTypes = list; } return (Class[])parameterTypes.toArray(new Class[param...
return getDeclaringClass().getName().hashCode() ^ getName().hashCode();
final Class<?> declClass = getDeclaringClass(); return declClass.getName().hashCode() ^ getName().hashCode();
public int hashCode() { return getDeclaringClass().getName().hashCode() ^ getName().hashCode(); }
sb.append(getReturnType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.');
final Class<?> retType = getReturnType(); final Class<?> declClass = getDeclaringClass(); sb.append(retType.getName()).append(' '); sb.append(declClass.getName()).append('.');
public String toString() { // 128 is a reasonable buffer initial size for constructor StringBuffer sb = new StringBuffer(128); Modifier.toString(getModifiers(), sb).append(' '); sb.append(getReturnType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()).append('('...
Class[] c = getParameterTypes();
Class<?>[] c = getParameterTypes();
public String toString() { // 128 is a reasonable buffer initial size for constructor StringBuffer sb = new StringBuffer(128); Modifier.toString(getModifiers(), sb).append(' '); sb.append(getReturnType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()).append('('...
public JMenuItem() { }
public JMenuItem() { this(null, null); }
public JMenuItem() { // TODO } // JMenuItem()
public void addMenuDragMouseListener(MenuDragMouseListener listener) { }
public void addMenuDragMouseListener(MenuDragMouseListener listener) { listenerList.add(MenuDragMouseListener.class, listener); }
public void addMenuDragMouseListener(MenuDragMouseListener listener) { // TODO } // addMenuDragMouseListener()
public void addMenuKeyListener(MenuKeyListener listener) { }
public void addMenuKeyListener(MenuKeyListener listener) { listenerList.add(MenuKeyListener.class, listener); }
public void addMenuKeyListener(MenuKeyListener listener) { // TODO } // addMenuKeyListener()
protected void configurePropertiesFromAction(Action action) { }
protected void configurePropertiesFromAction(Action action) { super.configurePropertiesFromAction(action); if (action == null) setAccelerator(null); else setAccelerator((KeyStroke) (action.getValue(Action.ACCELERATOR_KEY))); }
protected void configurePropertiesFromAction(Action action) { // TODO } // configurePropertiesFromAction()
protected PropertyChangeListener createActionPropertyChangeListener(Action action) { return null; }
protected PropertyChangeListener createActionPropertyChangeListener(Action action) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); configurePropertiesFromAction(act); } }; }
protected PropertyChangeListener createActionPropertyChangeListener(Action action) { return null; // TODO } // createActionPropertyChangeListener()
protected void fireMenuDragMouseDragged(MenuDragMouseEvent event) { }
protected void fireMenuDragMouseDragged(MenuDragMouseEvent event) { EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class); for (int i = 0; i < ll.length; i++) ((MenuDragMouseListener) ll[i]).menuDragMouseDragged(event); }
protected void fireMenuDragMouseDragged(MenuDragMouseEvent event) { // TODO } // fireMenuDragMouseDragged()
protected void fireMenuDragMouseEntered(MenuDragMouseEvent event) { }
protected void fireMenuDragMouseEntered(MenuDragMouseEvent event) { EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class); for (int i = 0; i < ll.length; i++) ((MenuDragMouseListener) ll[i]).menuDragMouseEntered(event); }
protected void fireMenuDragMouseEntered(MenuDragMouseEvent event) { // TODO } // fireMenuDragMouseEntered()
protected void fireMenuDragMouseExited(MenuDragMouseEvent event) { }
protected void fireMenuDragMouseExited(MenuDragMouseEvent event) { EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class); for (int i = 0; i < ll.length; i++) ((MenuDragMouseListener) ll[i]).menuDragMouseExited(event); }
protected void fireMenuDragMouseExited(MenuDragMouseEvent event) { // TODO } // fireMenuDragMouseExited()
protected void fireMenuDragMouseReleased(MenuDragMouseEvent event) { }
protected void fireMenuDragMouseReleased(MenuDragMouseEvent event) { EventListener[] ll = listenerList.getListeners(MenuDragMouseListener.class); for (int i = 0; i < ll.length; i++) ((MenuDragMouseListener) ll[i]).menuDragMouseReleased(event); }
protected void fireMenuDragMouseReleased(MenuDragMouseEvent event) { // TODO } // fireMenuDragMouseReleased()
public KeyStroke getAccelerator() { return null; }
public KeyStroke getAccelerator() { return accelerator; }
public KeyStroke getAccelerator() { return null; // TODO } // getAccelerator()
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) {
public AccessibleContext getAccessibleContext() { if (accessibleContext == null)
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJMenuItem(this); } // if return accessibleContext; } // getAccessibleContext()
}
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJMenuItem(this); } // if return accessibleContext; } // getAccessibleContext()
public MenuElement[] getSubElements() { return null; }
public MenuElement[] getSubElements() { return new MenuElement[0]; }
public MenuElement[] getSubElements() { return null; // TODO } // getSubElements()
public boolean isArmed() { return false; }
public boolean isArmed() { return getModel().isArmed(); }
public boolean isArmed() { return false; // TODO } // isArmed()
public void menuSelectionChanged(boolean changed) { }
public void menuSelectionChanged(boolean changed) { if (changed) model.setArmed(true); }
public void menuSelectionChanged(boolean changed) { // TODO } // menuSelectionChanged()
protected String paramString() { return null; }
protected String paramString() { return "JMenuItem"; }
protected String paramString() { return null; // TODO } // paramString()
public void processMenuDragMouseEvent(MenuDragMouseEvent event) { }
public void processMenuDragMouseEvent(MenuDragMouseEvent event) { switch (event.getID()) { case MouseEvent.MOUSE_ENTERED: fireMenuDragMouseEntered(event); break; case MouseEvent.MOUSE_EXITED: fireMenuDragMouseExited(event); break; case MouseEvent.MOUSE_DRAGGED: fireMenuDragMouseDragged(event); break; case MouseEvent.MO...
public void processMenuDragMouseEvent(MenuDragMouseEvent event) { // TODO } // processMenuDragMouseEvent()
MenuSelectionManager manager) { }
MenuSelectionManager manager) { switch (event.getID()) { case MouseEvent.MOUSE_CLICKED: doClick(); break; case MouseEvent.MOUSE_ENTERED: if (event.getSource() instanceof JMenuItem) { JMenuItem item = (JMenuItem) event.getSource(); ButtonModel model = item.getModel(); if (item.isRolloverEnabled()) model.setRollover(tru...
public void processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager) { // TODO } // processMouseEvent()
public void removeMenuDragMouseListener(MenuDragMouseListener listener) { }
public void removeMenuDragMouseListener(MenuDragMouseListener listener) { listenerList.remove(MenuDragMouseListener.class, listener); }
public void removeMenuDragMouseListener(MenuDragMouseListener listener) { // TODO } // removeMenuDragMouseListener()
public void removeMenuKeyListener(MenuKeyListener listener) { }
public void removeMenuKeyListener(MenuKeyListener listener) { listenerList.remove(MenuKeyListener.class, listener); }
public void removeMenuKeyListener(MenuKeyListener listener) { // TODO } // removeMenuKeyListener()
public void setAccelerator(KeyStroke keystroke) { }
public void setAccelerator(KeyStroke keystroke) { this.accelerator = keystroke; }
public void setAccelerator(KeyStroke keystroke) { // TODO } // setAccelerator()
public void setArmed(boolean armed) { }
public void setArmed(boolean armed) { getModel().setArmed(armed); }
public void setArmed(boolean armed) { // TODO } // setArmed()
public void setEnabled(boolean enabled) { }
public void setEnabled(boolean enabled) { setEnabled(enabled); }
public void setEnabled(boolean enabled) { // TODO } // setEnabled()
public void updateUI() { setUI((MenuItemUI) UIManager.get(this));
public void updateUI() { MenuItemUI mi = ((MenuItemUI) UIManager.getUI(this)); setUI(mi);
public void updateUI() { setUI((MenuItemUI) UIManager.get(this)); invalidate(); } // updateUI()
{ ButtonModel bmodel = null; if (c instanceof AbstractButton) bmodel = ((AbstractButton) c).getModel(); Color darkShadow = MetalLookAndFeel.getControlDarkShadow(); Color shadow = MetalLookAndFeel.getControlShadow(); Color light = MetalLookAndFeel.getControlHighlight(); Color middle = MetalLookAndFeel.getControl(); i...
paintDefaultButtonBorder(c, g, x, y, w, h);
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { // With the OceanTheme the button border is painted entirely different. // However, I couldn't figure out how this is determined besides checking // for instanceof OceanTheme. The button paint...
}
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { // With the OceanTheme the button border is painted entirely different. // However, I couldn't figure out how this is determined besides checking // for instanceof OceanTheme. The button paint...
if (bmodel.isPressed())
if (bmodel.isPressed() || ((c instanceof JButton) && ((JButton) c).isDefaultButton()))
private void paintOceanButtonBorder(Component c, Graphics g, int x, int y, int w, int h) { ButtonModel bmodel = null; if (c instanceof AbstractButton) bmodel = ((AbstractButton) c).getModel(); Color darkShadow = MetalLookAndFeel.getControlDarkSha...