rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public State addState(String name, String description) throws DuplicateStateException
protected void addState(State state)
public State addState(String name, String description) throws DuplicateStateException { if ( this.states.containsKey( name ) ) { throw new DuplicateStateException( this, name ); } State state = new State...
if ( this.states.containsKey( name ) ) { throw new DuplicateStateException( this, name ); } State state = new State( name, description ); addState( state ); return state;
this.states.put( state.getName(), state );
public State addState(String name, String description) throws DuplicateStateException { if ( this.states.containsKey( name ) ) { throw new DuplicateStateException( this, name ); } State state = new State...
public String (char[] data)
public String ()
public String (char[] data) { init(data, 0, data.length, false); }
init(data, 0, data.length, false);
init();
public String (char[] data) { init(data, 0, data.length, false); }
public ThreadGroup(String name)
private ThreadGroup()
public ThreadGroup(String name) { this(Thread.currentThread().group, name); }
this(Thread.currentThread().group, name);
name = "main"; parent = null; maxpri = Thread.MAX_PRIORITY;
public ThreadGroup(String name) { this(Thread.currentThread().group, name); }
public TestDelegator(java.lang.String testName) {
public TestDelegator(String testName) {
public TestDelegator(java.lang.String testName) { super(testName); }
public static void main(java.lang.String[] args) {
public static void main(String[] args) {
public static void main(java.lang.String[] args) { junit.textui.TestRunner.run(suite()); }
public static Object makeDelegator(Object[] delegates, ClassLoader loader) { Info info = getInfo(delegates); Object[] remapped = new Object[info.interfaces.length]; for (int i = 0; i < remapped.length; i++) { remapped[i] = delegates[info.indexes[i]]; } return makeDelegatorHelper(info.key, info.interfaces, remapped, loa...
public static Object makeDelegator(Class[] interfaces, Object[] delegates, ClassLoader loader) { return makeDelegatorHelper(keyFactory.newInstance(interfaces), interfaces, delegates, loader, false);
public static Object makeDelegator(Object[] delegates, ClassLoader loader) { Info info = getInfo(delegates); Object[] remapped = new Object[info.interfaces.length]; for (int i = 0; i < remapped.length; i++) { remapped[i] = delegates[info.indexes[i]]; } return makeDelega...
} else if (e.getPreviousValue() == null) { fireModification();
public void propertyValueChanged(PropertyEvent e) { if (e == null || e.getProperty() == null) return; if (e.getProperty().getValue() == null) { if (e.getPreviousValue() == null) return; else fireModification(); } else if (! e.getProperty().getValue().toString().trim().equals(e.getPreviousValue().toS...
log = CSMART.createLogger(this.getClass().getName());
protected ModifiableConfigurableComponent(String name) { super(name); log = CSMART.createLogger(this.getClass().getName()); }
component = (ModifiableComponent)this.copy(component);
public ModifiableComponent copy(String name) { Class cls = this.getClass(); try { Constructor constructor = cls.getConstructor(constructorArgTypes); ModifiableComponent component = (ModifiableComponent) constructor.newInstance(new String[] {name}); component.initProperties(); return compone...
decmp = CANONCIAL_DECOMPOSITION;
decmp = CANONICAL_DECOMPOSITION;
protected Collator () { strength = TERTIARY; decmp = CANONCIAL_DECOMPOSITION; }
&& mode != CANONCIAL_DECOMPOSITION
&& mode != CANONICAL_DECOMPOSITION
public synchronized void setDecomposition (int mode) { if (mode != NO_DECOMPOSITION && mode != CANONCIAL_DECOMPOSITION && mode != FULL_DECOMPOSITION) throw new IllegalArgumentException (); decmp = mode; }
int getRunLimit (Set attribs);
int getRunLimit();
int getRunLimit (Set attribs);
int getRunStart (Set attribs);
int getRunStart();
int getRunStart (Set attribs);
_rowCount = ERXEOAccessUtilities.rowCountForFetchSpecificationAndEditingContext(spec, ec);
_rowCount = ERXEOAccessUtilities.rowCountForFetchSpecification(ec, spec);
public int rowCount() { if(_rowCount == -1) { EOFetchSpecification spec = databaseDataSource().fetchSpecificationForFetch(); EOEditingContext ec = databaseDataSource().editingContext(); _rowCount = ERXEOAccessUtilities.rowCountForFetchSpecificationAndEditingContext(spec, ec);...
RecipeComponent[] recipes = experiment.getRecipes();
RecipeComponent[] recipes = experiment.getRecipeComponents();
public void selectExperimentFromDatabase() { Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel(); panel.add(new JLabel("Select Exper...
RecipeComponent[] recipes = experiment.getRecipes();
RecipeComponent[] recipes = experiment.getRecipeComponents();
public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperime...
byte [] delay_array = int2ByteArray(delay); byte [] width_array = int2ByteArray(width); byte [] height_array = int2ByteArray(height);
byte [] delay_array = ArrayManipulator.int2ByteArray(delay); byte [] width_array = ArrayManipulator.int2ByteArray(width); byte [] height_array = ArrayManipulator.int2ByteArray(height);
public static byte[] createNegoDatagram(int file_index, short opcode, int delay, int width, int height) throws InvalidParameterException { //creation if(!Opcode.isNego(opcode)) throw new InvalidParameterException("opcode isn't a correct value"); byte datagram[] = UDPDatagramHeader.createUDPDatagramHeader(file_in...
for(i=0; i<4; i++) datagram[i+6] = delay_array[i]; for(i=0; i<4; i++) datagram[i+10] = width_array[i]; for(i=0; i<4; i++) datagram[i+14] = height_array[i];
ArrayManipulator.copyArrayAtEnd(datagram, delay_array, shift); shift+=4; ArrayManipulator.copyArrayAtEnd(datagram, width_array, shift); shift+=4; ArrayManipulator.copyArrayAtEnd(datagram, height_array, shift);
public static byte[] createNegoDatagram(int file_index, short opcode, int delay, int width, int height) throws InvalidParameterException { //creation if(!Opcode.isNego(opcode)) throw new InvalidParameterException("opcode isn't a correct value"); byte datagram[] = UDPDatagramHeader.createUDPDatagramHeader(file_in...
return byteArray2Int(delay);
return ArrayManipulator.byteArray2Int(delay);
public static int getDelay(byte [] datagram) { byte delay[] = { datagram[UDPDatagramHeader.getHeaderSize()], datagram[UDPDatagramHeader.getHeaderSize()+1], datagram[UDPDatagramHeader.getHeaderSize()+2], datagram[UDPDatagramHeader.getHeaderSize()+3] }; return byteArray2Int(delay); }
return byteArray2Int(height);
return ArrayManipulator.byteArray2Int(height);
public static int getHeight(byte [] datagram) { byte height[] = { datagram[UDPDatagramHeader.getHeaderSize()+8], datagram[UDPDatagramHeader.getHeaderSize()+9], datagram[UDPDatagramHeader.getHeaderSize()+10], datagram[UDPDatagramHeader.getHeaderSize()+11] }; return byteArray2Int(height); }
return byteArray2Int(width);
return ArrayManipulator.byteArray2Int(width);
public static int getWidth(byte [] datagram) { byte width[] = { datagram[UDPDatagramHeader.getHeaderSize()+4], datagram[UDPDatagramHeader.getHeaderSize()+5], datagram[UDPDatagramHeader.getHeaderSize()+6], datagram[UDPDatagramHeader.getHeaderSize()+7] }; return byteArray2Int(width); }
final public static ByteBuffer wrap (byte[] array)
final public static ByteBuffer wrap (byte[] array, int offset, int length)
final public static ByteBuffer wrap (byte[] array) { return wrap (array, 0, array.length); }
bb = (bb.putInt(file_index).putShort(opcode)).order(ByteOrder.LITTLE_ENDIAN);
bb = bb.order(ByteOrder.LITTLE_ENDIAN).putInt(file_index).putShort(opcode);
protected static byte[] createUDPDatagramHeader(int file_index, short opcode, int array_size) { if(array_size<header_size) throw new InvalidParameterException("array_size must be greater than "+header_size+": "+array_size); ByteBuffer bb = ByteBuffer.allocate(array_size); bb = (bb.putInt(file_index).putShort...
GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
GLCanvas canvas = new GLCanvas();
public void run(String[] args) { GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); VertexProgWarp demo = new VertexProgWarp(); canvas.addGLEventListener(demo); final Animator animator = new Animator(canvas); demo.setDemoListener(new DemoListener() { public vo...
MethodDef(String name, String className, Occurrence occ, ClassDef type, ScopedDef parentScope) {
public MethodDef() {
MethodDef(String name, // the name of the method String className, // className (for constructor methods) Occurrence occ, // where it was defined ClassDef type, // the return type of the method ScopedDef parentScope) { // which scope owns it this(name, o...
this(name, occ, type, parentScope); if (className != null) { this.className = className.intern(); } else { this.className = className; }
MethodDef(String name, // the name of the method String className, // className (for constructor methods) Occurrence occ, // where it was defined ClassDef type, // the return type of the method ScopedDef parentScope) { // which scope owns it this(name, o...
void add(VariableDef param) {
void add(ClassDef excep) {
void add(VariableDef param) { if (parameters == null) { // lazy instantiation parameters = new JavaVector(); } parameters.addElement(param); }
if (parameters == null) { parameters = new JavaVector();
if (exceptions == null) { exceptions = new JavaVector();
void add(VariableDef param) { if (parameters == null) { // lazy instantiation parameters = new JavaVector(); } parameters.addElement(param); }
parameters.addElement(param);
exceptions.addElement(excep);
void add(VariableDef param) { if (parameters == null) { // lazy instantiation parameters = new JavaVector(); } parameters.addElement(param); }
ScopedDef(String name, Occurrence occ, ScopedDef parentScope) { super(name, occ, parentScope);
public ScopedDef() {
ScopedDef(String name, // the scoped name Occurrence occ, // where it's defined ScopedDef parentScope) { // scope containing the def super(name, occ, parentScope); // Create a new hashtable for fast element lookup elements = new JavaHashtable(); }
public ClassDefProxy(ClassDef ref) {
public ClassDefProxy() {
public ClassDefProxy(ClassDef ref) { whereCreated = new Throwable(); if (ref.getName().equals("RuntimeException")) { new Exception("what's up with this: " + ref).printStackTrace(); } // System.out.println("ref="+ref); setName(ref.getName()); this.packageName = re...
if (ref.getName().equals("RuntimeException")) { new Exception("what's up with this: " + ref).printStackTrace(); } setName(ref.getName()); this.packageName = ref.getPackageName();
public ClassDefProxy(ClassDef ref) { whereCreated = new Throwable(); if (ref.getName().equals("RuntimeException")) { new Exception("what's up with this: " + ref).printStackTrace(); } // System.out.println("ref="+ref); setName(ref.getName()); this.packageName = re...
_log.info(((EOKeyValueQualifier)qualifier).selector());
private EOQualifierSQLGeneration.Support supportForQualifier(EOQualifier qualifier) { EOQualifierSQLGeneration.Support support = null; if(qualifier instanceof EOKeyValueQualifier) { synchronized (_qualifierKeys) { support = (Support) _q...
public void setDefaultDelegateOnEditingContext(EOEditingContext ec, boolean validation);
public void setDefaultDelegateOnEditingContext(EOEditingContext ec);
public void setDefaultDelegateOnEditingContext(EOEditingContext ec, boolean validation);
line = line.trim();
public void initialize() { if (initialized) { return; } log.info("initialize start"); initialized = true; if(WOApplication.application()!=null && WOApplication.application().isCachingEnabled()) { log.info("I assume this is deployment mode, rapid-turnaround mode is disable...
public static Object readPropertyListFromFileInFramework(String fileName, String aFrameWorkName, NSArray languageList) { return readPropertyListFromFileInFramework( fileName, aFrameWorkName, languageList, System.getProperty("file.encoding") );
public static Object readPropertyListFromFileInFramework(String fileName, String aFrameWorkName) { return readPropertyListFromFileInFramework(fileName, aFrameWorkName, null, System.getProperty("file.encoding"));
public static Object readPropertyListFromFileInFramework(String fileName, String aFrameWorkName, NSArray languageList) { return readPropertyListFromFileInFramework( fileName, aFrameWorkName...
if(epi instanceof ERDErrorPageInterface && e instanceof Throwable) { ((ERDErrorPageInterface)epi).setException((Exception)e); }
public WOComponent errorPageForException(Throwable e, WOSession s) { myCheckRules(); ErrorPageInterface epi=D2W.factory().errorPage(s); epi.setMessage(ERXUtilities.stackTrace(e)); epi.setNextPage(s.context().page()); return (WOComponent)epi; }
public static String stackTrace(Throwable t) { ByteArrayOutputStream baos = new ByteArrayOutputStream(2048); PrintStream printStream = new PrintStream(baos); t.printStackTrace(printStream); return baos.toString();
public static String stackTrace() { String result; try { throw new Throwable(); } catch (Throwable t) { result = ERXUtilities.stackTrace(t); } return result.substring(122);
public static String stackTrace(Throwable t) { ByteArrayOutputStream baos = new ByteArrayOutputStream(2048); PrintStream printStream = new PrintStream(baos); t.printStackTrace(printStream); return baos.toString(); }
SecurityManager s = System.getSecurityManager (); if (s != null) s.checkListen(tmp.getPort ());
public void bind (SocketAddress address) throws SocketException { InetSocketAddress tmp = (InetSocketAddress) address; impl.bind (tmp.getPort (), tmp.getAddress ()); }
impl.disconnect();
public void disconnect() { //impl.disconnect(); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public boolean getBroadcast() throws SocketException { Object obj = impl.getOption (SocketOptions.SO_BROADCAST); if (obj instanceof Boolean) return ((Boolean) obj).booleanValue (); else throw new SocketException ("Unexpected type"); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public int getReceiveBufferSize() throws SocketException { Object obj = impl.getOption(SocketOptions.SO_RCVBUF); if (obj instanceof Integer) return(((Integer)obj).intValue()); else throw new SocketException("Unexpected type"); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public boolean getReuseAddress() throws SocketException { Object obj = impl.getOption (SocketOptions.SO_REUSEADDR); if (obj instanceof Boolean) return(((Boolean) obj).booleanValue ()); else throw new SocketException ("Unexpected type"); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public int getSendBufferSize() throws SocketException { Object obj = impl.getOption(SocketOptions.SO_SNDBUF); if (obj instanceof Integer) return(((Integer)obj).intValue()); else throw new SocketException("Unexpected type"); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public synchronized int getSoTimeout() throws SocketException { Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT); if (timeout instanceof Integer) return ((Integer)timeout).intValue(); else return 0; }
if (impl == null) throw new SocketException( "Cannot initialize Socket implementation");
public int getTrafficClass() throws SocketException { Object obj = impl.getOption(SocketOptions.IP_TOS); if (obj instanceof Integer) return ((Integer) obj).intValue (); else throw new SocketException ("Unexpected type"); }
s.checkAccept(p.getAddress().getHostAddress(), p.getPort());
s.checkAccept (p.getAddress().getHostName (), p.getPort ()); if (impl == null) throw new IOException ("Cannot initialize Socket implementation"); if (ch != null && !ch.isBlocking ()) throw new IllegalBlockingModeException ();
public synchronized void receive(DatagramPacket p) throws IOException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkAccept(p.getAddress().getHostAddress(), p.getPort()); impl.receive(p); }
if (ch != null && !ch.isBlocking ()) throw new IllegalBlockingModeException ();
public void send(DatagramPacket p) throws IOException { // JDK1.2: Don't do security checks if socket is connected; see jdk1.2 api. SecurityManager s = System.getSecurityManager(); if (s != null) { InetAddress addr = p.getAddress(); if (addr.isMulticastAddress()) s.checkMulticast(addr); else s.chec...
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public void setBroadcast(boolean on) throws SocketException { impl.setOption (SocketOptions.SO_BROADCAST, new Boolean (on)); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public void setReceiveBufferSize(int size) throws SocketException { if (size < 0) throw new IllegalArgumentException("Buffer size is less than 0"); impl.setOption(SocketOptions.SO_RCVBUF, new Integer(size)); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public void setReuseAddress(boolean on) throws SocketException { impl.setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); }
if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
public void setTrafficClass(int tc) throws SocketException { if (tc < 0 || tc > 255) throw new IllegalArgumentException(); impl.setOption (SocketOptions.IP_TOS, new Integer (tc)); }
public int getPort()
public final int getPort()
public int getPort() { return port; }
public Object get(int type) { return callbacks[type]; }
abstract public Callback get(int type);
public Object get(int type) { return callbacks[type]; }
JComboBox cb = new JComboBox(dbRecipeNames.toArray()); cb.setEditable(false); JPanel panel = new JPanel(); panel.add(new JLabel("Select Recipe:")); panel.add(cb); int result = JOptionPane.showConfirmDialog(null, panel, "Recipe", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); if (result != JOptionPane.OK_OPTI...
Object[] selectedRecipes = Util.getObjectsFromList(this, new ArrayList(dbRecipeNames), "Recipes", "Select Recipes"); if (selectedRecipes == null)
protected void selectRecipeFromDatabase() { Map recipeNamesHT = helper.getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database", ...
String recipeName = (String)cb.getSelectedItem(); String recipeId = (String) recipeNamesHT.get(recipeName); if (recipeNames.contains(recipeName)) recipeName = recipeNames.getUniqueName(recipeName, false); else recipeName = recipeNames.getUniqueName(recipeName, true); if (recipeName == null) return; RecipeCompon...
DefaultMutableTreeNode parentNode = getSelectedNode(); if (parentNode == null) parentNode = root; for (int i = 0; i < selectedRecipes.length; i++) { String recipeName = (String)selectedRecipes[i]; String recipeId = (String) recipeNamesHT.get(recipeName); if (recipeNames.contains(recipeName)) recipeName = recipeNames.ge...
protected void selectRecipeFromDatabase() { Map recipeNamesHT = helper.getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database", ...
public ReadOnlyProperties(Set readOnlyKeys, Properties defaults) { super(defaults); this.readOnlyKeys = readOnlyKeys; init(); }
public ReadOnlyProperties() { super(); init(); }
public ReadOnlyProperties(Set readOnlyKeys, Properties defaults) { super(defaults); this.readOnlyKeys = readOnlyKeys; init(); }
log.error("Expception getting channel size", e);
log.error("Exception getting channel size", e);
public static final boolean containsPattern(String filename, String pattern) { Logger log = CSMART.createLogger("org.coguaar.tools.csmart.FileParseUtil"); // Create the CharBuffer for the file. FileInputStream iStream = null; try { iStream = new FileInputStream(ConfigFinder.getInstance().locateFile(f...
reset();
public final CharBuffer decode (ByteBuffer in) throws CharacterCodingException { // XXX: Sun's Javadoc seems to contradict itself saying an // IllegalStateException is thrown "if a decoding operation is already // in progress" and also that "it resets this Decoder". // Should we check to see that the ...
Collection all = new HashSet();
public void execute() throws BuildException { Ivy ivy = getIvyInstance(); _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); ensureResolved(isHaltonfailure(), getOrganisation(), getModule()); _con...
all.addAll(Arrays.asList(artifacts)); } for (Iterator iter = all.iterator(); iter.hasNext();) { Artifact artifact = (Artifact)iter.next(); String name = IvyPatternHelper.substitute(ivy.substitute(getName()), artifact); String value = IvyPatternHelper.substitute(ivy.substitute(getValue()), artifact); getProject().setPro...
for (int j = 0; j < artifacts.length; j++) { Artifact artifact = artifacts[j]; String name = IvyPatternHelper.substitute(ivy.substitute(getName()), artifact, confs[i]); String value = IvyPatternHelper.substitute(ivy.substitute(getValue()), artifact, confs[i]); getProject().setProperty(name, value); }
public void execute() throws BuildException { Ivy ivy = getIvyInstance(); _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); ensureResolved(isHaltonfailure(), getOrganisation(), getModule()); _con...
throw new IllegalStateException("no report file found for "+moduleId+" "+conf+" in "+cache);
throw new IllegalStateException("no report file found for "+moduleId+" "+conf+" in "+cache+": ivy was looking for "+report);
public Artifact[] getArtifacts(ModuleId moduleId, String conf, File cache) throws ParseException, IOException { File report = new File(cache, XmlReportOutputter.getReportFileName(moduleId, conf)); if (!report.exists()) { throw new IllegalStateException("no report file found for "+moduleId+"...
public static String substitute(String pattern, Artifact artifact) { return substitute(pattern, artifact, null);
public static String substitute(String pattern, ModuleRevisionId moduleRevision) { return substitute(pattern, moduleRevision.getOrganisation(), moduleRevision.getName(), moduleRevision.getRevision(), "ivy", "ivy", "xml", null, moduleRevision.getAttributes());
public static String substitute(String pattern, Artifact artifact) { return substitute(pattern, artifact, null); }
if (nodeCreator == null) return; addStatusButton(nci.statusButton); ConsoleInternalFrame frame = new ConsoleInternalFrame(nci.nodeName, nci.hostName, nci.properties, nci.args, (ConsoleNodeListener)nci.listener, nci.scrollPane, nci.statusButton, nci.logFileName, remoteNode, console); frame.addInternalFrameListener(new N...
RemoteProcess remoteNode; synchronized (runningNodesLock) { remoteNode = (RemoteProcess)runningNodes.get(nodeName); } if (remoteNode == null) { if(log.isErrorEnabled()) { log.error("Unknown node name: " + nodeName); } return;
public void run() { // don't create gui controls if node creation has been stopped if (nodeCreator == null) return; addStatusButton(nci.statusButton); ConsoleInternalFrame frame = new ConsoleInternalFrame(nci.nodeName, ...
try { remoteNode.getRemoteListenable().flushOutput(); remoteNode.destroy(); } catch (Exception ex) { if(log.isErrorEnabled()) { log.error("Unable to destroy node, assuming it's dead: ", ex); } } }
public void run() { // don't create gui controls if node creation has been stopped if (nodeCreator == null) return; addStatusButton(nci.statusButton); ConsoleInternalFrame frame = new ConsoleInternalFrame(nci.nodeName, ...
descriptionPanel.add(Box.createRigidArea(HGAP5));
private void initGui() { String description = ""; if (experiment != null) { experiment.setRunInProgress(true); experiment.setResultDirectory(csmart.getResultDir()); description = experiment.getSocietyComponent().getSocietyName(); } // top level menus JMenu fileMenu = new JMenu(FILE_MENU)...
RemoteProcess remoteNode; synchronized (runningNodesLock) { remoteNode = (RemoteProcess)runningNodes.get(nodeName); } if (remoteNode == null) { if(log.isErrorEnabled()) { log.error("Unknown node name: " + nodeName); } continue; } try { remoteNode.getRemoteListenable().flushOutput(); remoteNode.destroy(); } catch (Excep...
nodeStopped(nodeName); getNodeStatusButton(nodeName).setStatus(NodeStatusButton.STATUS_NO_ANSWER);
private void stopAllNodes() { // if there's a thread still creating nodes, stop it stopNodeCreation = true; // wait for the creating thread to stop if (nodeCreator != null) { try { nodeCreator.join(); } catch (InterruptedException ie) { if(log.isErrorEnabled()) { log.error...
return source;
return (JInternalFrame) source;
public JInternalFrame getInternalFrame() { return source; }
public BufferedReader(Reader in, int size)
public BufferedReader(Reader in)
public BufferedReader(Reader in, int size) { super(in.lock); this.in = in; buffer = new char[size]; }
super(in.lock); this.in = in; buffer = new char[size];
this(in, DEFAULT_BUFFER_SIZE);
public BufferedReader(Reader in, int size) { super(in.lock); this.in = in; buffer = new char[size]; }
JComponent component) {
ConsoleTextPane pane) {
public void addNodeFrame(NodeComponent node, ConsoleNodeListener listener, InternalFrameListener frameListener, JComponent component) { JInternalFrame frame = new ConsoleInternalFrame(node, listener, component); frame.addIntern...
new ConsoleInternalFrame(node, listener, component);
new ConsoleInternalFrame(node, listener, pane);
public void addNodeFrame(NodeComponent node, ConsoleNodeListener listener, InternalFrameListener frameListener, JComponent component) { JInternalFrame frame = new ConsoleInternalFrame(node, listener, component); frame.addIntern...
public JRadioButton(String text)
public JRadioButton()
public JRadioButton(String text) { this(text, null); }
this(text, null);
this(null, null);
public JRadioButton(String text) { this(text, null); }
msgArray[NodeEvent.HEARTBEAT] = heartbeatCB.isSelected();
public ConsoleNodeOutputFilter(Frame parent, boolean[] initialValues, boolean acceptAll) { super(parent, "Filter", true); // modal dialog filterPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = ne...
heartbeatCB = new JCheckBox(HEARTBEAT); heartbeatCB.addActionListener(unselectAllCB);
public ConsoleNodeOutputFilter(Frame parent, boolean[] initialValues, boolean acceptAll) { super(parent, "Filter", true); // modal dialog filterPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = ne...
msgTypesPanel.add(heartbeatCB, new GridBagConstraints(x, y++, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
public ConsoleNodeOutputFilter(Frame parent, boolean[] initialValues, boolean acceptAll) { super(parent, "Filter", true); // modal dialog filterPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = ne...
heartbeatCB.setSelected(msgArray[NodeEvent.HEARTBEAT]);
public ConsoleNodeOutputFilter(Frame parent, boolean[] initialValues, boolean acceptAll) { super(parent, "Filter", true); // modal dialog filterPanel = new JPanel(new BorderLayout()); // ok and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton okButton = ne...
msgTypesCB.addItem(HEARTBEAT);
public ConsoleFontChooser() { // create a modal dialog super((java.awt.Frame)null, "Select Font", true); createLogger(); JPanel panel = new JPanel(new BorderLayout()); // define the gui here // apply and cancel buttons panel JPanel buttonPanel = new JPanel(); JButton applyButton = new JButton...
public JToggleButton(String text)
public JToggleButton()
public JToggleButton(String text) { this(text, null, false); }
this(text, null, false);
this(null, null, false);
public JToggleButton(String text) { this(text, null, false); }
public synchronized static void setPage(URL url) {
public static synchronized void setPage(URL url) {
public synchronized static void setPage(URL url) { if (singleton == null) { singleton = new Browser(); } else { singleton.setState(JFrame.NORMAL); } singleton.setURL(url); }
if (newStatus == STATUS_NOTIFY || newStatus == STATUS_STD_ERROR) {
if (newStatus == STATUS_NOTIFY || (newStatus == STATUS_STD_ERROR && notifyOnStandardError)) {
public void setStatus(int newStatus) { if (newStatus < 0 || newStatus > STATUS_MAX) return; // invalid status // if there's an error, add the warning icon if (newStatus == STATUS_NOTIFY || newStatus == STATUS_STD_ERROR) { URL iconURL = getClass().getResource("Bang.gif"); if (iconURL != null) {...
} else {
} else if (newStatus != STATUS_STD_ERROR) {
public void setStatus(int newStatus) { if (newStatus < 0 || newStatus > STATUS_MAX) return; // invalid status // if there's an error, add the warning icon if (newStatus == STATUS_NOTIFY || newStatus == STATUS_STD_ERROR) { URL iconURL = getClass().getResource("Bang.gif"); if (iconURL != null) {...
DelegatorGenerator(String className, Class[] interfaces, ClassLoader loader) {
DelegatorGenerator(String className, Class[] classes, ClassLoader loader, boolean bean) {
/* package */ DelegatorGenerator(String className, Class[] interfaces, ClassLoader loader) { super(className, TYPE_OBJECT, loader); this.interfaces = interfaces; }
this.interfaces = interfaces;
this.classes = classes; this.bean = bean;
/* package */ DelegatorGenerator(String className, Class[] interfaces, ClassLoader loader) { super(className, TYPE_OBJECT, loader); this.interfaces = interfaces; }
total_width = charWidth(buf[i]);
total_width += charWidth(buf[i]);
charsWidth(char buf[], int offset, int len){ int total_width = 0; for (int i = offset; i < len; i++) total_width = charWidth(buf[i]); return(total_width);}
return(new int[256]);
int [] result = new int[256]; for(char i = 0; i < 256; i++) { result[i]= charWidth(i); } return(result);
getWidths(){ return(new int[256]);}
FileDescriptor (String path, int mode) throws IOException
FileDescriptor (String path, int mode) throws FileNotFoundException
FileDescriptor (String path, int mode) throws IOException { fd = open (path, mode); }
checkAttribute( "name", this.name );
checkStringAttribute( "name", this.name );
public void doTag(XMLOutput output) throws Exception { Process process = getCurrentProcess(); checkAttribute( "name", this.name ); this.state = process.addState( this.name, this.description ); invokeBody( output ); if...
void log(Object objRef, int severity, String message);
void log(int severity, String message);
void log(Object objRef, int severity, String message);
log = CSMART.createLogger("org.cougaar.tools.csmart.ui");
createLogger();
public ConsoleFontChooser() { // create a modal dialog super((java.awt.Frame)null, "Select Font", true); log = CSMART.createLogger("org.cougaar.tools.csmart.ui"); JPanel panel = new JPanel(new BorderLayout()); // define the gui here // apply and cancel buttons panel JPanel buttonPanel = new JPan...
log_.info("sendRequest: posting : " + requestString + " to " + url);
log_.debug("sendRequest: posting : " + requestString + " to " + url);
private String[] sendRequest(String url, String requestString) throws ClickatellException, IOException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); List idList = new LinkedList(); // // Send request to clickatell // try ...
log_.info("sendRequest: Got ID : " + ((String) objs[1]));
log_.debug("sendRequest: Got ID : " + ((String) objs[1]));
private String[] sendRequest(String url, String requestString) throws ClickatellException, IOException { String response = null; MessageFormat responseFormat = new MessageFormat("{0}: {1}"); List idList = new LinkedList(); // // Send request to clickatell // try ...
public MessageFormat (String pattern)
private MessageFormat ()
public MessageFormat (String pattern) { locale = Locale.getDefault(); applyPattern (pattern); }
locale = Locale.getDefault(); applyPattern (pattern);
public MessageFormat (String pattern) { locale = Locale.getDefault(); applyPattern (pattern); }
super(); this.out = new OutputStreamWriter(out); this.lock = this.out;
super(wr); this.out = wr;
public PrintWriter(OutputStream out) { super(); this.out = new OutputStreamWriter(out); this.lock = this.out; }