bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
---|---|---|
public int executeFiles(int currentStage, AbstractUIHandler handler) { int exitStatus = 0; String[] output = new String[2]; String pathSep = System.getProperty("path.separator"); String osName = System.getProperty("os.name").toLowerCase(); //String permissions = (System.getProperty("user.name").equals("root")) ? "a+x" : "u+x"; String permissions = "a+x"; // loop through all executables Iterator efileIterator = files.iterator(); while ((exitStatus == 0) && efileIterator.hasNext()) { ExecutableFile efile = (ExecutableFile) efileIterator.next(); boolean deleteAfterwards = ! efile.keepFile; File file = new File(efile.path); Debug.trace("handeling executable file "+efile); // skip file if not for current OS (it might not have been installed at all) if (! OsConstraint.oneMatchesCurrentSystem (efile.osList)) continue; if(currentStage!=ExecutableFile.UNINSTALL) { // fix executable permission for unix systems if (pathSep.equals(":") && (!osName.startsWith("mac") || osName.endsWith("x"))) { Debug.trace("making file executable (setting executable flag)"); String[] params = {"/bin/chmod", permissions, file.toString()}; exitStatus = executeCommand(params, output); if (exitStatus != 0) { handler.emitError("file execution error", "Error executing \n"+ params[0]+" "+params[1]+" "+params[2]); continue; } } } // execute command in POSTINSTALL stage if ((exitStatus == 0) && ((currentStage == ExecutableFile.POSTINSTALL && efile.executionStage == ExecutableFile.POSTINSTALL) || (currentStage==ExecutableFile.UNINSTALL && efile.executionStage == ExecutableFile.UNINSTALL))) { List paramList = new ArrayList(); if (ExecutableFile.BIN == efile.type) paramList.add(file.toString()); else if (ExecutableFile.JAR == efile.type && null == efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-jar"); paramList.add(file.toString()); } else if (ExecutableFile.JAR == efile.type && null != efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-cp"); paramList.add(file.toString()); paramList.add(efile.mainClass); } if (null != efile.argList && !efile.argList.isEmpty()) paramList.addAll(efile.argList); String[] params = new String[paramList.size()]; for (int i = 0; i < paramList.size(); i++) params[i] = (String) paramList.get(i); exitStatus = executeCommand(params, output); // bring a dialog depending on return code and failure handling if (exitStatus != 0) { deleteAfterwards = false; String message = output[0] + "\n" + output[1]; if (message.length() == 1) message = new String("Failed to execute " + file.toString() + "."); if (efile.onFailure == ExecutableFile.ABORT) { // CHECKME: let the user decide or abort anyway? handler.emitError("file execution error", message); } else if (efile.onFailure == ExecutableFile.WARN) { // CHECKME: let the user decide or abort anyway? handler.emitWarning ("file execution error", message); exitStatus = 0; } else { if (handler.askQuestion (null, "Continue?", AbstractUIHandler.CHOICES_YES_NO) == AbstractUIHandler.ANSWER_YES) exitStatus = 0; } } } // POSTINSTALL executables will be deleted if (efile.executionStage == ExecutableFile.POSTINSTALL && deleteAfterwards) { if (file.canWrite()) file.delete(); } } return exitStatus; }
|
public int executeFiles(int currentStage, AbstractUIHandler handler) { int exitStatus = 0; String[] output = new String[2]; String pathSep = System.getProperty("path.separator"); String osName = System.getProperty("os.name").toLowerCase(); //String permissions = (System.getProperty("user.name").equals("root")) ? "a+x" : "u+x"; String permissions = "a+x"; // loop through all executables Iterator efileIterator = files.iterator(); while ((exitStatus == 0) && efileIterator.hasNext()) { ExecutableFile efile = (ExecutableFile) efileIterator.next(); boolean deleteAfterwards = ! efile.keepFile; File file = new File(efile.path); Debug.trace("handeling executable file "+efile); // skip file if not for current OS (it might not have been installed at all) if (! OsConstraint.oneMatchesCurrentSystem (efile.osList)) continue; if(currentStage!=ExecutableFile.UNINSTALL) { // fix executable permission for unix systems if (pathSep.equals(":") && (!osName.startsWith("mac") || osName.endsWith("x"))) { Debug.trace("making file executable (setting executable flag)"); String[] params = {"/bin/chmod", permissions, file.toString()}; exitStatus = executeCommand(params, output); if (exitStatus != 0) { handler.emitError("file execution error", "Error executing \n"+ params[0]+" "+params[1]+" "+params[2]); continue; } } } // execute command in POSTINSTALL stage if ((exitStatus == 0) && ((currentStage == ExecutableFile.POSTINSTALL && efile.executionStage == ExecutableFile.POSTINSTALL) || (currentStage==ExecutableFile.UNINSTALL && efile.executionStage == ExecutableFile.UNINSTALL))) { List paramList = new ArrayList(); if (ExecutableFile.BIN == efile.type) paramList.add(file.toString()); else if (ExecutableFile.JAR == efile.type && null == efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-jar"); paramList.add(file.toString()); } else if (ExecutableFile.JAR == efile.type && null != efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-cp"); paramList.add(file.toString()); paramList.add(efile.mainClass); } if (null != efile.argList && !efile.argList.isEmpty()) paramList.addAll(efile.argList); String[] params = new String[paramList.size()]; for (int i = 0; i < paramList.size(); i++) params[i] = (String) paramList.get(i); exitStatus = executeCommand(params, output); // bring a dialog depending on return code and failure handling if (exitStatus != 0) { deleteAfterwards = false; String message = output[0] + "\n" + output[1]; if (message.length() == 1) message = "Failed to execute " + file.toString() + "."; if (efile.onFailure == ExecutableFile.ABORT) { // CHECKME: let the user decide or abort anyway? handler.emitError("file execution error", message); } else if (efile.onFailure == ExecutableFile.WARN) { // CHECKME: let the user decide or abort anyway? handler.emitWarning ("file execution error", message); exitStatus = 0; } else { if (handler.askQuestion (null, "Continue?", AbstractUIHandler.CHOICES_YES_NO) == AbstractUIHandler.ANSWER_YES) exitStatus = 0; } } } // POSTINSTALL executables will be deleted if (efile.executionStage == ExecutableFile.POSTINSTALL && deleteAfterwards) { if (file.canWrite()) file.delete(); } } return exitStatus; }
| 3,239,540 |
int getNumActive() throws UnsupportedOperationException;
|
int getNumActive() throws UnsupportedOperationException;
| 3,239,541 |
int getNumIdle() throws UnsupportedOperationException;
|
int getNumIdle() throws UnsupportedOperationException;
| 3,239,542 |
public static ObjectPool adapt(final KeyedObjectPool keyedPool) throws IllegalArgumentException { return adapt(keyedPool, new Object()); }
|
public static ObjectPool adapt(final KeyedObjectPool keyedPool) throws IllegalArgumentException { return adapt(keyedPool, new Object()); }
| 3,239,543 |
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } if (minIdle < 0) { throw new IllegalArgumentException("minIdle must be non-negative."); } final TimerTask task = new KeyedObjectPoolMinIdleTimerTask(keyedPool, key, minIdle); getMinIdleTimer().schedule(task, 0L, period); return task; }
|
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } if (minIdle < 0) { throw new IllegalArgumentException("minIdle must be non-negative."); } final TimerTask task = new KeyedObjectPoolMinIdleTimerTask(keyedPool, key, minIdle); getMinIdleTimer().schedule(task, 0L, period); return task; }
| 3,239,544 |
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } if (minIdle < 0) { throw new IllegalArgumentException("minIdle must be non-negative."); } final TimerTask task = new KeyedObjectPoolMinIdleTimerTask(keyedPool, key, minIdle); getMinIdleTimer().schedule(task, 0L, period); return task; }
|
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } if (minIdle < 0) { throw new IllegalArgumentException("minIdle must be non-negative."); } final TimerTask task = new KeyedObjectPoolMinIdleTimerTask(keyedPool, key, minIdle); getMinIdleTimer().schedule(task, 0L, period); return task; }
| 3,239,545 |
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } if (minIdle < 0) { throw new IllegalArgumentException("minIdle must be non-negative."); } final TimerTask task = new KeyedObjectPoolMinIdleTimerTask(keyedPool, key, minIdle); getMinIdleTimer().schedule(task, 0L, period); return task; }
|
public static TimerTask checkMinIdle(final KeyedObjectPool keyedPool, final Object key, final int minIdle, final long period) throws IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } if (minIdle < 0) { throw new IllegalArgumentException("minIdle must be non-negative."); } final TimerTask task = new ObjectPoolMinIdleTimerTask(pool, minIdle); getMinIdleTimer().schedule(task, 0L, period); return task; }
| 3,239,546 |
public GenericKeyedObjectPool(KeyedPoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,DEFAULT_TEST_WHILE_IDLE); }
|
public GenericKeyedObjectPool(KeyedPoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,DEFAULT_TEST_WHILE_IDLE); }
| 3,239,547 |
public GenericObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_MIN_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,DEFAULT_TEST_WHILE_IDLE); }
|
public GenericObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_ACTIVE,DEFAULT_WHEN_EXHAUSTED_ACTION,DEFAULT_MAX_WAIT,DEFAULT_MAX_IDLE,DEFAULT_MIN_IDLE,DEFAULT_TEST_ON_BORROW,DEFAULT_TEST_ON_RETURN,DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,DEFAULT_NUM_TESTS_PER_EVICTION_RUN,DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,DEFAULT_TEST_WHILE_IDLE); }
| 3,239,548 |
public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); } return new CheckedKeyedObjectPool(keyedPool, type); }
|
public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); } return new CheckedKeyedObjectPool(keyedPool, type); }
| 3,239,549 |
public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); } return new CheckedKeyedObjectPool(keyedPool, type); }
|
public static KeyedObjectPool checkedPool(final KeyedObjectPool keyedPool, final Class type) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (type == null) { throw new IllegalArgumentException("type must not be null."); } return new CheckedObjectPool(pool, type); }
| 3,239,550 |
public static KeyedObjectPool erodingPool(final KeyedObjectPool keyedPool) { return erodingPool(keyedPool, 1f); }
|
public static KeyedObjectPool erodingPool(final KeyedObjectPool keyedPool) { return erodingPool(keyedPool, 1f); }
| 3,239,551 |
public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } for (int i = 0; i < count; i++) { keyedPool.addObject(key); } }
|
public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } for (int i = 0; i < count; i++) { keyedPool.addObject(key); } }
| 3,239,552 |
public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } for (int i = 0; i < count; i++) { keyedPool.addObject(key); } }
|
public static void prefill(final KeyedObjectPool keyedPool, final Object key, final int count) throws Exception, IllegalArgumentException { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } if (key == null) { throw new IllegalArgumentException("key must not be null."); } for (int i = 0; i < count; i++) { pool.addObject(); } }
| 3,239,553 |
public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already thread-safe"; assert !(keyedPool instanceof StackKeyedObjectPool) : "StackKeyedObjectPool is already thread-safe"; assert !"org.apache.commons.pool.composite.CompositeKeyedObjectPool".equals(keyedPool.getClass().getName()) : "CompositeKeyedObjectPools are already thread-safe"; return new SynchronizedKeyedObjectPool(keyedPool); }
|
public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already thread-safe"; assert !(keyedPool instanceof StackKeyedObjectPool) : "StackKeyedObjectPool is already thread-safe"; assert !"org.apache.commons.pool.composite.CompositeKeyedObjectPool".equals(keyedPool.getClass().getName()) : "CompositeKeyedObjectPools are already thread-safe"; return new SynchronizedKeyedObjectPool(keyedPool); }
| 3,239,554 |
public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already thread-safe"; assert !(keyedPool instanceof StackKeyedObjectPool) : "StackKeyedObjectPool is already thread-safe"; assert !"org.apache.commons.pool.composite.CompositeKeyedObjectPool".equals(keyedPool.getClass().getName()) : "CompositeKeyedObjectPools are already thread-safe"; return new SynchronizedKeyedObjectPool(keyedPool); }
|
public static KeyedObjectPool synchronizedPool(final KeyedObjectPool keyedPool) { if (keyedPool == null) { throw new IllegalArgumentException("keyedPool must not be null."); } assert !(keyedPool instanceof GenericKeyedObjectPool) : "GenericKeyedObjectPool is already thread-safe"; assert !(keyedPool instanceof StackKeyedObjectPool) : "StackKeyedObjectPool is already thread-safe"; assert !"org.apache.commons.pool.composite.CompositeKeyedObjectPool".equals(keyedPool.getClass().getName()) : "CompositeKeyedObjectPools are already thread-safe"; return new SynchronizedKeyedObjectPool(keyedPool); }
| 3,239,555 |
public static KeyedPoolableObjectFactory synchronizedPoolableFactory(final KeyedPoolableObjectFactory keyedFactory) { return new SynchronizedKeyedPoolableObjectFactory(keyedFactory); }
|
public static KeyedPoolableObjectFactory synchronizedPoolableFactory(final KeyedPoolableObjectFactory keyedFactory) { return new SynchronizedKeyedPoolableObjectFactory(keyedFactory); }
| 3,239,556 |
public void stopUnpack() { parent.releaseGUI(); parent.lockPrevButton(); installButton.setIcon(parent.icons.getImageIcon("empty")); installButton.setEnabled(false); progressBar.setString(parent.langpack.getString("InstallPanel.finished")); progressBar.setEnabled(false); opLabel.setText(""); opLabel.setEnabled(false); idata.installSuccess = true; idata.canClose = true; validated = true; if (idata.panels.indexOf(this) != (idata.panels.size() - 1)) parent.unlockNextButton(); }
|
public void stopUnpack() { parent.releaseGUI(); parent.lockPrevButton(); installButton.setIcon(parent.icons.getImageIcon("empty")); installButton.setEnabled(false); progressBar.setString(parent.langpack.getString("InstallPanel.finished")); progressBar.setEnabled(false); opLabel.setText(" "); opLabel.setEnabled(false); idata.installSuccess = true; idata.canClose = true; validated = true; if (idata.panels.indexOf(this) != (idata.panels.size() - 1)) parent.unlockNextButton(); }
| 3,239,557 |
HighlightJButton(String text, Icon icon, Color color) { super(text, icon); initButton(color); }
|
HighlightJButton(Icon icon, Color color) { super(text, icon); initButton(color); }
| 3,239,558 |
HighlightJButton(String text, Icon icon, Color color) { super(text, icon); initButton(color); }
|
HighlightJButton(String text, Icon icon, Color color) { super(icon); initButton(color); }
| 3,239,559 |
public void panelActivate() { }
|
public void panelActivate() { }
| 3,239,560 |
public IzPackMetalTheme() { color = new ColorUIResource(0, 0, 0); Font font1 = createFont("Tahoma", Font.PLAIN, 11); Font font2 = createFont("Tahoma", Font.BOLD, 11); menuFont = new FontUIResource(font1); controlFont = new FontUIResource(font1); windowTitleFont = new FontUIResource(font2); monospacedFont = new FontUIResource(font1); }
|
public IzPackMetalTheme() { color = new ColorUIResource(0, 0, 0); Font font1 = createFont("Tahoma", Font.PLAIN, 11); Font font2 = createFont("Tahoma", Font.BOLD, 11); menuFont = new FontUIResource(font1); controlFont = new FontUIResource(font1); windowTitleFont = new FontUIResource(font2); monospacedFont = new FontUIResource(font1); }
| 3,239,561 |
public IzPackMetalTheme() { color = new ColorUIResource(0, 0, 0); Font font1 = createFont("Tahoma", Font.PLAIN, 11); Font font2 = createFont("Tahoma", Font.BOLD, 11); menuFont = new FontUIResource(font1); controlFont = new FontUIResource(font1); windowTitleFont = new FontUIResource(font2); monospacedFont = new FontUIResource(font1); }
|
public IzPackMetalTheme() { color = new ColorUIResource(0, 0, 0); Font font1 = createFont("Tahoma", Font.PLAIN, 11); Font font2 = createFont("Tahoma", Font.BOLD, 11); menuFont = new FontUIResource(font1); controlFont = new FontUIResource(font1); windowTitleFont = new FontUIResource(font2); monospacedFont = new FontUIResource(font1); }
| 3,239,562 |
public IzPackMetalTheme() { color = new ColorUIResource(0, 0, 0); Font font1 = createFont("Tahoma", Font.PLAIN, 11); Font font2 = createFont("Tahoma", Font.BOLD, 11); menuFont = new FontUIResource(font1); controlFont = new FontUIResource(font1); windowTitleFont = new FontUIResource(font2); monospacedFont = new FontUIResource(font1); }
|
public IzPackMetalTheme() { color = new ColorUIResource(0, 0, 0); Font font1 = createFont("Tahoma", Font.PLAIN, 11); Font font2 = createFont("Tahoma", Font.BOLD, 11); menuFont = new FontUIResource(font1); controlFont = new FontUIResource(font1); windowTitleFont = new FontUIResource(font2); monospacedFont = new FontUIResource(font1); }
| 3,239,563 |
public ColorUIResource getControlTextColor() { return color; }
|
public ColorUIResource getControlTextColor() { return color; }
| 3,239,564 |
public ColorUIResource getMenuTextColor() { return color; }
|
public ColorUIResource getMenuTextColor() { return color; }
| 3,239,565 |
public ColorUIResource getSystemTextColor() { return color; }
|
public ColorUIResource getSystemTextColor() { return color; }
| 3,239,566 |
public ColorUIResource getUserTextColor() { return color; }
|
public ColorUIResource getUserTextColor() { return color; }
| 3,239,567 |
public MultiLineLabel (String label, int marginWidth, int marginHeight) { this.labelText = label; this.marginWidth = marginWidth; this.marginHeight = marginHeight; }
|
public MultiLineLabel (String label, int marginWidth, int marginHeight) { this.labelText = label; this.marginWidth = marginWidth; this.marginHeight = marginHeight; }
| 3,239,568 |
public MultiLineLabel (String label, int marginWidth, int marginHeight) { this.labelText = label; this.marginWidth = marginWidth; this.marginHeight = marginHeight; }
|
public MultiLineLabel (String label, int marginWidth, int marginHeight) { this.labelText = label; this.marginWidth = marginWidth; this.marginHeight = marginHeight; }
| 3,239,569 |
public StackKeyedObjectPool(KeyedPoolableObjectFactory factory, int max) { this(factory,max,DEFAULT_INIT_SLEEPING_CAPACITY); }
|
public StackKeyedObjectPool(KeyedPoolableObjectFactory factory, int max) { this(factory,max,DEFAULT_INIT_SLEEPING_CAPACITY); }
| 3,239,571 |
public int getNumActive(Object key) { try { return ((Integer)_activeCount.get(key)).intValue(); } catch(NoSuchElementException e) { return 0; } catch(NullPointerException e) { return 0; } }
|
public int getNumActive(Object key) { try { return ((Integer)_activeCount.get(key)).intValue(); } catch(NoSuchElementException e) { return 0; } catch(NullPointerException e) { return 0; } }
| 3,239,572 |
public synchronized int getNumIdle(Object key) { try { return((Stack)(_pools.get(key))).size(); } catch(Exception e) { return 0; } }
|
public synchronized int getNumIdle(Object key) { try { return((Stack)(_pools.get(key))).size(); } catch(Exception e) { return 0; } }
| 3,239,573 |
public void addExecutable(String path) { executablesList.add(path); }
|
public void addExecutable(ExecutableFile file) { executablesList.add(path); }
| 3,239,575 |
public void addExecutable(String path) { executablesList.add(path); }
|
public void addExecutable(String path) { executablesList.add(file); }
| 3,239,576 |
public ArrayList getExecutablesList() { return executablesList; }
|
public List getExecutablesList() { return executablesList; }
| 3,239,577 |
public ArrayList getFilesList() { return filesList; }
|
public List getFilesList() { return filesList; }
| 3,239,578 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,579 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,580 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,581 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,582 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,583 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { continue; } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,584 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,585 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
publicsynchronizedObjectborrowObject()throwsException{assertOpen();longstarttime=System.currentTimeMillis();booleannewlyCreated=false;for(;;){ObjectTimestampPairpair=null;//ifthereareanysleeping,justgraboneofthosetry{pair=(ObjectTimestampPair)(_pool.removeFirst());}catch(NoSuchElementExceptione){;/*ignored*/}//otherwiseif(null==pair){//checkifwecancreateone//(noteweknowthatthenumsleepingis0,elsewewouldn'tbehere)if(_maxActive<=0||_numActive<_maxActive){Objectobj=_factory.makeObject();pair=newObjectTimestampPair(obj);newlyCreated=true;}else{//thepoolisexhaustedswitch(_whenExhaustedAction){caseWHEN_EXHAUSTED_GROW:Objectobj=_factory.makeObject();pair=newObjectTimestampPair(obj);break;caseWHEN_EXHAUSTED_FAIL:thrownewNoSuchElementException();caseWHEN_EXHAUSTED_BLOCK:try{if(_maxWait<=0){wait();}else{wait(_maxWait);}}catch(InterruptedExceptione){//ignored}if(_maxWait>0&&((System.currentTimeMillis()-starttime)>=_maxWait)){thrownewNoSuchElementException("Timeoutwaitingforidleobject");}else{continue;//keeplooping}default:thrownewIllegalArgumentException("whenExhaustedAction"+_whenExhaustedAction+"notrecognized.");}}}try{_factory.activateObject(pair.value);if(_testOnBorrow&&!_factory.validateObject(pair.value)){thrownewException("validateObjectfailed");}_numActive++;returnpair.value;}catch(Exceptione){try{_factory.destroyObject(pair.value);}catch(Exceptione2){//cannotdestroybrokenobject}if(newlyCreated){thrownewNoSuchElementException("Couldnotcreateavalidatedobject");}else{continue;//keeplooping}}}}
| 3,239,586 |
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } _numActive++; return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
|
public synchronized Object borrowObject() throws Exception { assertOpen(); long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } return pair.value; } catch (Exception e) { try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object"); } else { continue; // keep looping } } } }
| 3,239,587 |
public StdXMLReader(InputStream stream) throws IOException { StringBuffer charsRead = new StringBuffer(); Reader reader = this.stream2reader(stream, charsRead); this.currentLineReader = new LineNumberReader(reader); this.currentPbReader = new PushbackReader(this.currentLineReader, 2); this.pbreaders = new Stack(); this.linereaders = new Stack(); this.publicIds = new Stack(); this.systemIds = new Stack(); this.currentPublicID = ""; try { this.currentSystemID = new URL("file:."); } catch (MalformedURLException e) { // never happens } this.startNewStream(new StringReader(charsRead.toString())); }
|
public StdXMLReader(String publicID, String systemID) throws MalformedURLException, FileNotFoundException, IOException { StringBuffer charsRead = new StringBuffer(); Reader reader = this.stream2reader(stream, charsRead); this.currentLineReader = new LineNumberReader(reader); this.currentPbReader = new PushbackReader(this.currentLineReader, 2); this.pbreaders = new Stack(); this.linereaders = new Stack(); this.publicIds = new Stack(); this.systemIds = new Stack(); this.currentPublicID = ""; try { this.currentSystemID = new URL("file:."); } catch (MalformedURLException e) { // never happens } this.startNewStream(new StringReader(charsRead.toString())); }
| 3,239,589 |
public StdXMLReader(InputStream stream) throws IOException { StringBuffer charsRead = new StringBuffer(); Reader reader = this.stream2reader(stream, charsRead); this.currentLineReader = new LineNumberReader(reader); this.currentPbReader = new PushbackReader(this.currentLineReader, 2); this.pbreaders = new Stack(); this.linereaders = new Stack(); this.publicIds = new Stack(); this.systemIds = new Stack(); this.currentPublicID = ""; try { this.currentSystemID = new URL("file:."); } catch (MalformedURLException e) { // never happens } this.startNewStream(new StringReader(charsRead.toString())); }
|
public StdXMLReader(InputStream stream) throws IOException { StringBuffer charsRead = new StringBuffer(); Reader reader = this.stream2reader(stream, charsRead); this.currentLineReader = new LineNumberReader(reader); this.currentPbReader = new PushbackReader(this.currentLineReader, 2); this.pbreaders = new Stack(); this.linereaders = new Stack(); this.publicIds = new Stack(); this.systemIds = new Stack(); this.currentPublicID = ""; try { this.currentSystemID = new URL("file:."); } catch (MalformedURLException e) { // never happens } this.startNewStream(new StringReader(charsRead.toString())); }
| 3,239,590 |
public StdXMLReader(InputStream stream) throws IOException { StringBuffer charsRead = new StringBuffer(); Reader reader = this.stream2reader(stream, charsRead); this.currentLineReader = new LineNumberReader(reader); this.currentPbReader = new PushbackReader(this.currentLineReader, 2); this.pbreaders = new Stack(); this.linereaders = new Stack(); this.publicIds = new Stack(); this.systemIds = new Stack(); this.currentPublicID = ""; try { this.currentSystemID = new URL("file:."); } catch (MalformedURLException e) { // never happens } this.startNewStream(new StringReader(charsRead.toString())); }
|
public StdXMLReader(InputStream stream) throws IOException { StringBuffer charsRead = new StringBuffer(); Reader reader = this.stream2reader(stream, charsRead); this.currentLineReader = new LineNumberReader(reader); this.currentPbReader = new PushbackReader(this.currentLineReader, 2); this.pbreaders = new Stack(); this.linereaders = new Stack(); this.publicIds = new Stack(); this.systemIds = new Stack(); this.currentPublicID = ""; try { this.currentSystemID = new URL("file:."); } catch (MalformedURLException e) { // never happens } this.startNewStream(new StringReader(charsRead.toString())); }
| 3,239,591 |
private Font createFont(String name, int style, int size) { Font font = new Font(name, style, size); return ((font == null) ? new Font("Dialog", style, size) : font); }
|
private Font createFont(String name, int style, int size) { Font font = new Font(name, style, size); return ((font == null) ? new Font("Dialog", style, size) : font); }
| 3,239,592 |
public FontUIResource getControlTextFont() { return controlFont; }
|
public FontUIResource getControlTextFont() { return controlFont; }
| 3,239,593 |
public FontUIResource getMenuTextFont() { return menuFont; }
|
public FontUIResource getMenuTextFont() { return menuFont; }
| 3,239,594 |
public FontUIResource getSystemTextFont() { return controlFont; }
|
public FontUIResource getSystemTextFont() { return controlFont; }
| 3,239,595 |
public FontUIResource getUserTextFont() { return controlFont; }
|
public FontUIResource getUserTextFont() { return controlFont; }
| 3,239,596 |
public FontUIResource getWindowTitleFont() { return windowTitleFont; }
|
public FontUIResource getWindowTitleFont() { return windowTitleFont; }
| 3,239,597 |
public Object borrowObject() throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; synchronized(this) { assertOpen(); // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive <= 0 || _numActive < _maxActive) { // allow new object to be created } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: // allow new object to be created break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } _numActive++; } // end synchronized // create new object when needed if(null == pair) { try { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } catch (Exception e) { // object cannot be created synchronized(this) { _numActive--; notifyAll(); } throw e; } } // activate & validate the object try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } return pair.value; } catch (Exception e) { // object cannot be activated or is invalid synchronized(this) { _numActive--; notifyAll(); } try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object, cause: " + e.getMessage()); } else { continue; // keep looping } } } }
|
public Object borrowObject() throws Exception { long starttime = System.currentTimeMillis(); boolean newlyCreated = false; for(;;) { ObjectTimestampPair pair = null; synchronized(this) { assertOpen(); // if there are any sleeping, just grab one of those try { pair = (ObjectTimestampPair)(_pool.removeFirst()); } catch(NoSuchElementException e) { ; /* ignored */ } // otherwise if(null == pair) { // check if we can create one // (note we know that the num sleeping is 0, else we wouldn't be here) if(_maxActive < 0 || _numActive < _maxActive) { // allow new object to be created } else { // the pool is exhausted switch(_whenExhaustedAction) { case WHEN_EXHAUSTED_GROW: // allow new object to be created break; case WHEN_EXHAUSTED_FAIL: throw new NoSuchElementException(); case WHEN_EXHAUSTED_BLOCK: try { if(_maxWait <= 0) { wait(); } else { wait(_maxWait); } } catch(InterruptedException e) { // ignored } if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) { throw new NoSuchElementException("Timeout waiting for idle object"); } else { continue; // keep looping } default: throw new IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not recognized."); } } } _numActive++; } // end synchronized // create new object when needed if(null == pair) { try { Object obj = _factory.makeObject(); pair = new ObjectTimestampPair(obj); newlyCreated = true; } catch (Exception e) { // object cannot be created synchronized(this) { _numActive--; notifyAll(); } throw e; } } // activate & validate the object try { _factory.activateObject(pair.value); if(_testOnBorrow && !_factory.validateObject(pair.value)) { throw new Exception("validateObject failed"); } return pair.value; } catch (Exception e) { // object cannot be activated or is invalid synchronized(this) { _numActive--; notifyAll(); } try { _factory.destroyObject(pair.value); } catch (Exception e2) { // cannot destroy broken object } if(newlyCreated) { throw new NoSuchElementException("Could not create a validated object, cause: " + e.getMessage()); } else { continue; // keep looping } } } }
| 3,239,598 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener(new MouseAdapter() { }); glassPane.addMouseMotionListener(new MouseMotionAdapter() { }); glassPane.addKeyListener(new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout()); //layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer, BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton( langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton( langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton( langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel, BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); iconLabel = new JLabel(icon); iconLabel.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(iconLabel, BorderLayout.CENTER); contentPane.add(imgPanel, BorderLayout.WEST); } } catch (Exception e) { //ignore } loadImage(0); getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener(new MouseAdapter() { }); glassPane.addMouseMotionListener(new MouseMotionAdapter() { }); glassPane.addKeyListener(new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout()); //layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer, BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton( langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton( langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton( langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel, BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon; try { icon = rm.getImageIconResource("Installer.image"); } catch (Exception e) { icon = rm.getImageIconResource("Installer.image.0"); } if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); iconLabel = new JLabel(icon); iconLabel.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(iconLabel, BorderLayout.CENTER); contentPane.add(imgPanel, BorderLayout.WEST); } } catch (Exception e) { //ignore } loadImage(0); getRootPane().setDefaultButton(nextButton); }
| 3,239,599 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener(new MouseAdapter() { }); glassPane.addMouseMotionListener(new MouseMotionAdapter() { }); glassPane.addKeyListener(new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout()); //layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer, BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton( langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton( langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton( langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel, BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); iconLabel = new JLabel(icon); iconLabel.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(iconLabel, BorderLayout.CENTER); contentPane.add(imgPanel, BorderLayout.WEST); } } catch (Exception e) { //ignore } loadImage(0); getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener(new MouseAdapter() { }); glassPane.addMouseMotionListener(new MouseMotionAdapter() { }); glassPane.addKeyListener(new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout()); //layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer, BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton( langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton( langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton( langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel, BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); iconLabel = new JLabel(icon); iconLabel.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(iconLabel, BorderLayout.NORTH); contentPane.add(imgPanel, BorderLayout.WEST); } } catch (Exception e) { //ignore } loadImage(0); getRootPane().setDefaultButton(nextButton); }
| 3,239,600 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener(new MouseAdapter() { }); glassPane.addMouseMotionListener(new MouseMotionAdapter() { }); glassPane.addKeyListener(new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout()); //layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer, BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton( langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton( langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton( langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel, BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); iconLabel = new JLabel(icon); iconLabel.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(iconLabel, BorderLayout.CENTER); contentPane.add(imgPanel, BorderLayout.WEST); } } catch (Exception e) { //ignore } loadImage(0); getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener(new MouseAdapter() { }); glassPane.addMouseMotionListener(new MouseMotionAdapter() { }); glassPane.addKeyListener(new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout()); //layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer, BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton( langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton( langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton( langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel, BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); iconLabel = new JLabel(icon); iconLabel.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(iconLabel, BorderLayout.CENTER); contentPane.add(imgPanel, BorderLayout.WEST); } } catch (Exception e) { //ignore } loadImage(0); getRootPane().setDefaultButton(nextButton); }
| 3,239,601 |
public InputStream getResource(String res) { String basePath = ""; ResourceManager rm = null; try { rm = ResourceManager.getInstance(); basePath = rm.resourceBasePath; return this.getClass().getResourceAsStream(basePath+res); } catch (Exception e) { return null; } }
|
public InputStream getResource(String res) { String basePath = ""; ResourceManager rm = null; try { rm = ResourceManager.getInstance(); basePath = rm.resourceBasePath; return this.getClass().getResourceAsStream(basePath+res); } catch (Exception e) { return null; } }
| 3,239,602 |
public InputStream getResource(String res) { String basePath = ""; ResourceManager rm = null; try { rm = ResourceManager.getInstance(); basePath = rm.resourceBasePath; return this.getClass().getResourceAsStream(basePath+res); } catch (Exception e) { return null; } }
|
public InputStream getResource(String res) { String basePath = ""; ResourceManager rm = null; try { rm = ResourceManager.getInstance(); basePath = rm.resourceBasePath; return this.getClass().getResourceAsStream(basePath+res); } catch (Exception e) { return null; } }
| 3,239,603 |
private void loadImage(int panelNo) { try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image."+panelNo); if (icon != null) { iconLabel.setVisible(false); iconLabel.setIcon(icon); iconLabel.setVisible(true); } } catch (Exception e) { //ignore } }
|
private void loadImage(int panelNo) { try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image." + panelNo); if (icon != null) { iconLabel.setVisible(false); iconLabel.setIcon(icon); iconLabel.setVisible(true); } } catch (Exception e) { //ignore } }
| 3,239,604 |
private void loadImage(int panelNo) { try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image."+panelNo); if (icon != null) { iconLabel.setVisible(false); iconLabel.setIcon(icon); iconLabel.setVisible(true); } } catch (Exception e) { //ignore } }
|
private void loadImage(int panelNo) { try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image."+panelNo); if (icon != null) { iconLabel.setVisible(false); iconLabel.setIcon(icon); iconLabel.setVisible(true); } } catch (Exception e) { //ignore } }
| 3,239,605 |
public void skipPanel() { if (installdata.curPanelNumber < installdata.panels.size() - 1) { if (isBack) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); }else { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } }
|
public void skipPanel() { if (installdata.curPanelNumber < installdata.panels.size() - 1) { if (isBack) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); }else { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } }
| 3,239,606 |
protected void switchPanel(int last) { if (installdata.curPanelNumber<last) { isBack = true; } panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton(); // if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); loadImage(installdata.curPanelNumber); isBack = false; }
|
protected void switchPanel(int last) { if (installdata.curPanelNumber<last) { isBack = true; } panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton(); // if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); loadImage(installdata.curPanelNumber); isBack = false; }
| 3,239,607 |
protected void switchPanel(int last) { if (installdata.curPanelNumber<last) { isBack = true; } panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton(); // if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); loadImage(installdata.curPanelNumber); isBack = false; }
|
protected void switchPanel(int last) { if (installdata.curPanelNumber<last) { isBack = true; } panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton(); // if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); loadImage(installdata.curPanelNumber); isBack = false; }
| 3,239,608 |
protected void switchPanel(int last) { if (installdata.curPanelNumber<last) { isBack = true; } panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton(); // if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); loadImage(installdata.curPanelNumber); isBack = false; }
|
protected void switchPanel(int last) { if (installdata.curPanelNumber<last) { isBack = true; } panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton(); // if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); loadImage(installdata.curPanelNumber); isBack = false; }
| 3,239,609 |
public XMLElement(String name) { this(name, null, NO_LINE); }
|
public XMLElement() { this(name, null, NO_LINE); }
| 3,239,610 |
public XMLElement(String name) { this(name, null, NO_LINE); }
|
public XMLElement(String name) { this(null, null, NO_LINE); }
| 3,239,611 |
public void makeXMLData(XMLElement panelRoot) { }
|
public void makeXMLData(XMLElement panelRoot) { }
| 3,239,612 |
public void panelDeactivate() { }
|
public void panelDeactivate() { }
| 3,239,613 |
public String getUninstallerJarFilename() { return uninstallerJarFilename; }
|
public synchronized String getUninstallerJarFilename() { return uninstallerJarFilename; }
| 3,239,614 |
public abstract Object makeObject();
|
public abstract Object makeObject();
| 3,239,615 |
public UninstallerFrame() throws Exception { super("IzPack - Uninstaller"); // Initializations langpack = new LocaleDatabase(getClass().getResourceAsStream("/langpack.xml")); getInstallPath(); icons = new IconsDatabase(); loadIcons(); UIManager.put( "OptionPane.yesButtonText", langpack.getString("installer.yes")); UIManager.put( "OptionPane.noButtonText", langpack.getString("installer.no")); UIManager.put( "OptionPane.cancelButtonText", langpack.getString("installer.cancel")); // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // We build the GUI & show it buildGUI(); addWindowListener(new WindowHandler()); pack(); centerFrame(this); setResizable(false); setVisible(true); }
|
public UninstallerFrame() throws Exception { super("IzPack - Uninstaller"); // Initializations langpack = new LocaleDatabase(UninstallerFrame.class.getResourceAsStream("/langpack.xml")); getInstallPath(); icons = new IconsDatabase(); loadIcons(); UIManager.put( "OptionPane.yesButtonText", langpack.getString("installer.yes")); UIManager.put( "OptionPane.noButtonText", langpack.getString("installer.no")); UIManager.put( "OptionPane.cancelButtonText", langpack.getString("installer.cancel")); // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // We build the GUI & show it buildGUI(); addWindowListener(new WindowHandler()); pack(); centerFrame(this); setResizable(false); setVisible(true); }
| 3,239,616 |
private void getInstallPath() throws Exception { InputStream in = getClass().getResourceAsStream("/install.log"); InputStreamReader inReader = new InputStreamReader(in); BufferedReader reader = new BufferedReader(inReader); installPath = reader.readLine(); reader.close(); }
|
private void getInstallPath() throws Exception { InputStream in = UninstallerFrame.class.getResourceAsStream("/install.log"); InputStreamReader inReader = new InputStreamReader(in); BufferedReader reader = new BufferedReader(inReader); installPath = reader.readLine(); reader.close(); }
| 3,239,617 |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = getClass().getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = getClass().getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = getClass().getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = getClass().getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
|
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = UninstallerFrame.class.getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = getClass().getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = getClass().getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = getClass().getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
| 3,239,618 |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = getClass().getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = getClass().getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = getClass().getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = getClass().getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
|
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = getClass().getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = UninstallerFrame.class.getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = getClass().getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = getClass().getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
| 3,239,619 |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = getClass().getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = getClass().getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = getClass().getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = getClass().getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
|
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = getClass().getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = getClass().getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = UninstallerFrame.class.getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = getClass().getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
| 3,239,620 |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = getClass().getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = getClass().getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = getClass().getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = getClass().getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
|
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; // We load it url = getClass().getResource("/img/trash.png"); img = new ImageIcon(url); icons.put("delete", img); url = getClass().getResource("/img/stop.png"); img = new ImageIcon(url); icons.put("stop", img); url = getClass().getResource("/img/flag.png"); img = new ImageIcon(url); icons.put("warning", img); url = UninstallerFrame.class.getResource("/img/JFrameIcon.png"); img = new ImageIcon(url); icons.put("JFrameIcon", img); }
| 3,239,621 |
public void testAuthenticateWithProxy() throws Exception { this.context = new CasSecurityContext(new TicketValidator() { public Assertion validate(String ticketId, Service service) throws ValidationException { return new AssertionImpl(new SimplePrincipal("test"), new HashMap()); } }, new SimpleService("test")); this.context.getOpaqueCredentialsInstance().setCredentials("ticket"); this.context.authenticate(); assertEquals("test", this.context.getProxyTicket(new SimpleService("test"))); }
|
public void testAuthenticateWithProxy() throws Exception { this.context = new CasSecurityContext(new TicketValidator() { public Assertion validate(String ticketId, Service service) throws ValidationException { return new AssertionImpl(new SimplePrincipal("test"), new HashMap(), new ProxyRetriever() { public String getProxyTicketIdFor(String proxyGrantingTicketId, Service targetService) { return "test"; } }, "proxyTicketId"); } }, new SimpleService("test")); this.context.getOpaqueCredentialsInstance().setCredentials("ticket"); this.context.authenticate(); assertEquals("test", this.context.getProxyTicket(new SimpleService("test"))); }
| 3,239,622 |
public Assertion validate(String ticketId, Service service) throws ValidationException { return new AssertionImpl(new SimplePrincipal("test"), new HashMap()); }
|
public Assertion validate(String ticketId, Service service) throws ValidationException { return new AssertionImpl(new SimplePrincipal("test"), new HashMap(), new ProxyRetriever() { public String getProxyTicketIdFor(String proxyGrantingTicketId, Service targetService) { return "test"; } }, "proxyTicketId"); }
| 3,239,623 |
public XMLElement getFirstChildNamed(String name) { Enumeration enum = this.children.elements(); while (enum.hasMoreElements()) { XMLElement child = (XMLElement) enum.nextElement(); if (child.getName().equals(name)) { return child; } }
|
public XMLElement getFirstChildNamed(String name) { Enumeration enum = this.children.elements(); while (enum.hasMoreElements()) { XMLElement child = (XMLElement) enum.nextElement(); if (cName != null && cName.equals(name)) { return child; } }
| 3,239,625 |
private void initvalues() { //name to pack position map namesPos = new HashMap(); for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); namesPos.put(pack.name,new Integer(i)); } //Init to the first values for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); if(packsToInstall.contains(pack)); checkValues[i] =1; } //Check out and disable the ones that are excluded by non fullfiled deps for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); if(checkValues[i] ==0) { List deps = pack.revDependencies; for (int j = 0;deps != null && j < deps.size(); j++) { String name = (String) deps.get(j); int pos = getPos(name); checkValues[pos] = -2; } } } // The required ones must propagate their required status to all the ones // that they depend on for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); if(pack.required ==true) propRequirement(pack.name); } }
|
private void initvalues() { //name to pack position map namesPos = new HashMap(); for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); namesPos.put(pack.name,new Integer(i)); } //Init to the first values for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); if(packsToInstall.contains(pack)); checkValues[i] =1; } //Check out and disable the ones that are excluded by non fullfiled deps for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); if(checkValues[i] ==0) { List deps = pack.revDependencies; for (int j = 0;deps != null && j < deps.size(); j++) { String name = (String) deps.get(j); int pos = getPos(name); checkValues[pos] = -2; } } } // The required ones must propagate their required status to all the ones // that they depend on for (int i = 0; i < packs.size(); i++) { Pack pack = (Pack) packs.get(i); if(pack.required ==true) propRequirement(pack.name); } }
| 3,239,626 |
public static String toByteUnitsString(int bytes) { if (bytes < KILOBYTES) return String.valueOf(bytes) + " bytes"; else if (bytes < (MEGABYTES)) { double value = bytes / KILOBYTES; return formatter.format(value) + " KB"; } else if (bytes < (GIGABYTES)) { double value = bytes / MEGABYTES; return formatter.format(value) + " MB"; } else { double value = bytes / GIGABYTES; return formatter.format(value) + " GB"; } }
|
public static String toByteUnitsString(long bytes) { if (bytes < KILOBYTES) return String.valueOf(bytes) + " bytes"; else if (bytes < (MEGABYTES)) { double value = bytes / KILOBYTES; return formatter.format(value) + " KB"; } else if (bytes < (GIGABYTES)) { double value = bytes / MEGABYTES; return formatter.format(value) + " MB"; } else { double value = bytes / GIGABYTES; return formatter.format(value) + " GB"; } }
| 3,239,627 |
protected String getEncoding(String str) { if (!str.startsWith("<?xml")) { return null; } int index = 5; while (index < str.length()) { StringBuffer key = new StringBuffer(); while ((index < str.length()) && (str.charAt(index) <= ' ')) { index++; } while ((index < str.length()) && (str.charAt(index) >= 'a') && (str.charAt(index) <= 'z')) { key.append(str.charAt(index)); index++; } while ((index < str.length()) && (str.charAt(index) <= ' ')) { index++; } if ((index >= str.length()) || (str.charAt(index) != '=')) { break; } while ((index < str.length()) && (str.charAt(index) != '\'') && (str.charAt(index) != '"')) { index++; } if (index >= str.length()) { break; } char delimiter = str.charAt(index); index++; int index2 = str.indexOf(delimiter, index); if (index2 < 0) { break; } if (key.toString().equals("encoding")) { return str.substring(index, index2); } index = index2 + 1; } return null; }
|
protected String getEncoding(String str) { if (!str.startsWith("<?xml")) { return null; } int index = 5; while (index < str.length()) { StringBuffer key = new StringBuffer(); while ((index < str.length()) && (str.charAt(index) <= ' ')) { index++; } while ((index < str.length()) && (str.charAt(index) >= 'a') && (str.charAt(index) <= 'z')) { key.append(str.charAt(index)); index++; } while ((index < str.length()) && (str.charAt(index) <= ' ')) { index++; } if ((index >= str.length()) || (str.charAt(index) != '=')) { break; } while ((index < str.length()) && (str.charAt(index) != '\'') && (str.charAt(index) != '"')) { index++; } if (index >= str.length()) { break; } char delimiter = str.charAt(index); index++; int index2 = str.indexOf(delimiter, index); if (index2 < 0) { break; } if ("encoding".equals(key.toString())) { return str.substring(index, index2); } index = index2 + 1; } return null; }
| 3,239,628 |
public String getSummaryBody() { StringBuffer retval = new StringBuffer(256); Iterator iter = idata.selectedPacks.iterator(); boolean first = true; while (iter.hasNext()) { if (!first) { retval.append("<br>"); } first = false; Pack pack = (Pack) iter.next(); if (langpack != null && pack.id != null && !pack.id.equals("")) { retval.append(langpack.getString(pack.id)); } else retval.append(pack.name); } return (retval.toString()); }
|
public String getSummaryBody() { StringBuffer retval = new StringBuffer(256); Iterator iter = idata.selectedPacks.iterator(); boolean first = true; while (iter.hasNext()) { if (!first) { retval.append("<br>"); } first = false; Pack pack = (Pack) iter.next(); if (langpack != null && pack.id != null && !"".equals(pack.id)) { retval.append(langpack.getString(pack.id)); } else retval.append(pack.name); } return (retval.toString()); }
| 3,239,629 |
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !pack.id.equals("")) { desc = langpack.getString(key); } if (desc.equals("") || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !childPack.id.equals("")) { childName = langpack.getString(key); } if (childName.equals("") || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
|
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !"".equals(pack.id)) { desc = langpack.getString(key); } if (desc.equals("") || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !childPack.id.equals("")) { childName = langpack.getString(key); } if (childName.equals("") || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
| 3,239,630 |
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !pack.id.equals("")) { desc = langpack.getString(key); } if (desc.equals("") || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !childPack.id.equals("")) { childName = langpack.getString(key); } if (childName.equals("") || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
|
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !pack.id.equals("")) { desc = langpack.getString(key); } if ("".equals(desc) || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !childPack.id.equals("")) { childName = langpack.getString(key); } if (childName.equals("") || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
| 3,239,631 |
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !pack.id.equals("")) { desc = langpack.getString(key); } if (desc.equals("") || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !childPack.id.equals("")) { childName = langpack.getString(key); } if (childName.equals("") || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
|
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !pack.id.equals("")) { desc = langpack.getString(key); } if (desc.equals("") || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !"".equals(childPack.id)) { childName = langpack.getString(key); } if (childName.equals("") || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
| 3,239,632 |
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !pack.id.equals("")) { desc = langpack.getString(key); } if (desc.equals("") || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !childPack.id.equals("")) { childName = langpack.getString(key); } if (childName.equals("") || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
|
public void valueChanged(ListSelectionEvent e) { int i = packsTable.getSelectedRow(); if (i < 0) return; // Operations for the description if (descriptionArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); String desc = ""; String key = pack.id + ".description"; if (langpack != null && pack.id != null && !pack.id.equals("")) { desc = langpack.getString(key); } if (desc.equals("") || key.equals(desc)) { desc = pack.description; } descriptionArea.setText(desc); } // Operation for the dependency listing if (dependencyArea != null) { Pack pack = (Pack) idata.availablePacks.get(i); List dep = pack.dependencies; String list = ""; for (int j = 0; dep != null && j < dep.size(); j++) { String name = (String) dep.get(j); // Internationalization code Pack childPack = (Pack) names.get(name); String childName = ""; String key = childPack.id; if (langpack != null && childPack.id != null && !childPack.id.equals("")) { childName = langpack.getString(key); } if ("".equals(childName) || key.equals(childName)) { childName = childPack.name; } // End internationalization list += childName; if (j != dep.size() - 1) list += ", "; } dependencyArea.setText(list); } }
| 3,239,633 |
public InputStream getInputStream(String resource) throws ResourceNotFoundException { String resourcepath = this.getLanguageResourceString(resource); //System.out.println ("reading resource "+resourcepath); return this.getClass().getResourceAsStream(resourcepath); }
|
public InputStream getInputStream(String resource) throws ResourceNotFoundException { String resourcepath = this.getLanguageResourceString(resource); //System.out.println ("reading resource "+resourcepath); return ResourceManager.class.getResourceAsStream(resourcepath); }
| 3,239,634 |
public final static long getFreeSpace(String path) { long retval = -1; int state; if( IoHelper.getOSFamily() == WINDOWS ) { String[] params = {"CMD", "/C", "\"dir /D /-C \"" + path + "\"\""}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%"); } else if( IoHelper.getOSFamily() == UNIX ) { String[] params = {"df", "-Pk", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%"); } else if(IoHelper.getOSFamily() == MAC) { String[] params = {"df", "-k", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%"); } return retval; }
|
public final static long getFreeSpace(String path) { long retval = -1; int state; if( IoHelper.getOSFamily() == WINDOWS ) { String[] params = {"CMD", "/C", "\"dir /D /-C \"" + path + "\"\""}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%") * 1024; } else if( IoHelper.getOSFamily() == UNIX ) { String[] params = {"df", "-Pk", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%") * 1024; } else if(IoHelper.getOSFamily() == MAC) { String[] params = {"df", "-k", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%") * 1024; } return retval; }
| 3,239,635 |
public final static long getFreeSpace(String path) { long retval = -1; int state; if( IoHelper.getOSFamily() == WINDOWS ) { String[] params = {"CMD", "/C", "\"dir /D /-C \"" + path + "\"\""}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%"); } else if( IoHelper.getOSFamily() == UNIX ) { String[] params = {"df", "-Pk", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%"); } else if(IoHelper.getOSFamily() == MAC) { String[] params = {"df", "-k", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%"); } return retval; }
|
public final static long getFreeSpace(String path) { long retval = -1; int state; if( IoHelper.getOSFamily() == WINDOWS ) { String[] params = {"CMD", "/C", "\"dir /D /-C \"" + path + "\"\""}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%") * 1024; } else if( IoHelper.getOSFamily() == UNIX ) { String[] params = {"df", "-Pk", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%") * 1024; } else if(IoHelper.getOSFamily() == MAC) { String[] params = {"df", "-k", path}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); state = fe.executeCommand(params, output); retval = extractLong(output[0], -3, 3, "%") * 1024; } return retval; }
| 3,239,636 |
public static QuantumStrategy getStrategy(QuantumDef qd) { verifyDef(qd); QuantumStrategy strg = null; QuantumMap qMap = null; switch (qd.family) { case LINEAR: case POLYNOMIAL: qMap = new PolynomialMap(); break; case LOGARITHMIC: qMap = new LogarithmicMap(); break; case EXPONENTIAL: qMap = new ExponentialMap(); break; default: //Never reached, verifyDef throws exception if wrong family. } strg = getQuantization(qd); strg.setMap(qMap); return strg; }
|
public static QuantumStrategy getStrategy(QuantumDef qd) { verifyDef(qd); QuantumStrategy strg = null; QuantumMap qMap = null; switch (qd.family) { case LINEAR: case POLYNOMIAL: qMap = new PolynomialMap(); break; case LOGARITHMIC: qMap = new LogarithmicMap(); break; case EXPONENTIAL: qMap = new ExponentialMap(); break; default: //Never reached, verifyDef throws exception if wrong family. } strg = getQuantization(qd); strg.setMap(qMap); return strg; }
| 3,239,637 |
private static void verifyDef(QuantumDef qd) { if (qd == null) throw new NullPointerException("No quantum definition."); verifyFamily(qd.family); verifyBitResolution(qd.bitResolution); verifyPixelType(qd.pixelType); }
|
private static void verifyDef(QuantumDef qd) { if (qd == null) throw new NullPointerException("No quantum definition."); verifyBitResolution(qd.bitResolution); verifyPixelType(qd.pixelType); }
| 3,239,638 |
public FinishPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); vs = new VariableSubstitutor(idata.getVariableValueMap()); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); }
|
public FinishPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); vs = new VariableSubstitutor(idata.getVariables()); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); }
| 3,239,639 |
public StackObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_SLEEPING,DEFAULT_INIT_SLEEPING_CAPACITY); }
|
public StackObjectPool(PoolableObjectFactory factory) { this(factory,DEFAULT_MAX_SLEEPING,DEFAULT_INIT_SLEEPING_CAPACITY); }
| 3,239,641 |
public MethodCall(final String name, final Object param) { this(name, Collections.singletonList(param)); }
|
public MethodCall(final String name, final Object param) { this(name, Collections.singletonList(param)); }
| 3,239,642 |
public TestObjectPoolFactory(final String name) { super(name); }
|
protected TestObjectPoolFactory(final String name) { super(name); }
| 3,239,643 |
protected ObjectPoolFactory makeFactory(PoolableObjectFactory objectFactory) throws UnsupportedOperationException { throw new UnsupportedOperationException("Subclass needs to override makeFactory method."); }
|
protected ObjectPoolFactory makeFactory(PoolableObjectFactory objectFactory) throws UnsupportedOperationException { throw new UnsupportedOperationException("Subclass needs to override makeFactory method."); }
| 3,239,644 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.