rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return Component.this.isShowing() ? Component.this.getBounds() : null;
return Component.this.getBounds();
public Rectangle getBounds() { return Component.this.isShowing() ? Component.this.getBounds() : null; }
return Component.this.isShowing() ? Component.this.getLocation() : null;
return Component.this.getLocation();
public Point getLocation() { return Component.this.isShowing() ? Component.this.getLocation() : null; }
return Component.this.isShowing() ? Component.this.getSize() : null;
return Component.this.getSize();
public Dimension getSize() { return Component.this.isShowing() ? Component.this.getSize() : null; }
KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager ();
Container focusRoot = getFocusCycleRootAncestor(); Component focusComp = this; while (focusRoot != null && ! (focusRoot.isShowing() && focusRoot.isFocusable() && focusRoot.isEnabled())) { focusComp = focusRoot; focusRoot = focusComp.getFocusCycleRootAncestor(); }
public void nextFocus () { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.focusNextComponent (this); }
manager.focusNextComponent (this);
if (focusRoot != null) { FocusTraversalPolicy policy = focusRoot.getFocusTraversalPolicy(); Component nextFocus = policy.getComponentAfter(focusRoot, focusComp); if (nextFocus == null) nextFocus = policy.getDefaultComponent(focusRoot); if (nextFocus != null) nextFocus.requestFocus(); }
public void nextFocus () { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.focusNextComponent (this); }
KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager ();
Container focusRoot = getFocusCycleRootAncestor(); Component focusComp = this; while (focusRoot != null && ! (focusRoot.isShowing() && focusRoot.isFocusable() && focusRoot.isEnabled())) { focusComp = focusRoot; focusRoot = focusComp.getFocusCycleRootAncestor(); }
public void transferFocusBackward () { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.focusPreviousComponent (this); }
manager.focusPreviousComponent (this);
if (focusRoot != null) { FocusTraversalPolicy policy = focusRoot.getFocusTraversalPolicy(); Component nextFocus = policy.getComponentBefore(focusRoot, focusComp); if (nextFocus == null) nextFocus = policy.getDefaultComponent(focusRoot); if (nextFocus != null) nextFocus.requestFocus(); }
public void transferFocusBackward () { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.focusPreviousComponent (this); }
KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager ();
Container focusCycleRoot = getFocusCycleRootAncestor(); while (focusCycleRoot != null && ! (focusCycleRoot.isShowing() && focusCycleRoot.isFocusable() && focusCycleRoot.isEnabled())) { focusCycleRoot = focusCycleRoot.getFocusCycleRootAncestor(); }
public void transferFocusUpCycle () { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.upFocusCycle (this); }
manager.upFocusCycle (this);
KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); if (focusCycleRoot != null) { Container focusCycleAncestor = focusCycleRoot.getFocusCycleRootAncestor(); Container globalFocusCycleRoot; if (focusCycleAncestor == null) globalFocusCycleRoot = focusCycleRoot; else globalFocusCycleRoot...
public void transferFocusUpCycle () { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.upFocusCycle (this); }
oldKey = newKey;
oldKey = (int) ((KeyEvent) e).getKeyChar();
static Event translateEvent (AWTEvent e) { Object target = e.getSource (); Event translated = null; if (e instanceof InputEvent) { InputEvent ie = (InputEvent) e; long when = ie.getWhen (); int oldID = 0; int id = e.getID (); int oldMods = 0; int mods = ie.getM...
setBorder(BorderFactory.createLineBorder(Color.gray, 1)); border = BorderFactory.createEmptyBorder(2, 5, 2, 5);
border = BorderFactory.createEmptyBorder(1, 4, 1, 4);
public StatusBar() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); setRequestFocusEnabled(false); setFocusable(false); setBorder(BorderFactory.createLineBorder(Color.gray, 1)); border = BorderFactory.createEmptyBorder(2, 5, 2, 5); }
return height;
return height + 5;
public int getHeight() { Component[] components = getComponents(); int height = 0; for(int i = 0; i < components.length; i++) { Component c = components[i]; if(c instanceof DisplayItem) { int itemHeight = c.getPreferredSize().height; if(itemHeight > height) height = itemHeigh...
public DirStateFactory.Result getStateToBind(Object obj, Name name,
DirStateFactory.Result getStateToBind(Object obj, Name name,
public DirStateFactory.Result getStateToBind(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes inAttrs) throws NamingException;
MessageProxy m = (MessageProxy)consumerDelegate.getMessageNow(true);
if (trace) { log.trace("Activation runnable running, getting message now"); } try { MessageProxy m = (MessageProxy)consumerDelegate.getMessageNow(true);
public void run() { try { //We always try and return the message immediately, if available. //This prevents an extra network call to deliver the message. //If the message is not available, the consumer will stay active and //the message will d...
if (m != null) { handleMessage(m);
if (trace) { log.trace("Got message:" + m); } if (m != null) { if (trace) { log.trace("Handling:" + m); } handleMessage(m); } if (trace) { log.trace("Activation runnable done"); }
public void run() { try { //We always try and return the message immediately, if available. //This prevents an extra network call to deliver the message. //If the message is not available, the consumer will stay active and //the message will d...
synchronized (activationLock)
finally
public void run() { try { //We always try and return the message immediately, if available. //This prevents an extra network call to deliver the message. //If the message is not available, the consumer will stay active and //the message will d...
if (activationCount == 0)
if (closing)
public void run() { try { //We always try and return the message immediately, if available. //This prevents an extra network call to deliver the message. //If the message is not available, the consumer will stay active and //the message will d...
activationLock.notify();
synchronized (mainLock) { mainLock.notifyAll(); }
public void run() { try { //We always try and return the message immediately, if available. //This prevents an extra network call to deliver the message. //If the message is not available, the consumer will stay active and //the message will d...
throw new IllegalStateException("Thread interrupted while receiving");
m = null;
protected MessageProxy getMessage(long timeout) throws JMSException { MessageProxy m = null; // If it's receiveNoWait then get the message directly if (timeout == -1) { m = getMessageNow(); } else { // ... otherwise we activate the server side consum...
public Object execute()
public JobResult execute()
public Object execute() { job.run(); return job.getResult(); }
pullRulesets(style, sheet);
CSSRuleList rl = style.getCssRules(); pullRulesets(rl, sheet, info);
public Stylesheet parse(java.io.Reader reader, StylesheetInfo info) { InputSource is = new InputSource(reader); CSSStyleSheet style = null; try { style = parser.parseStyleSheet(is); } catch (java.io.IOException e) { throw new XRRuntimeException("IOException on parsi...
private void pullRulesets(org.w3c.dom.css.CSSStyleSheet cssSheet, Stylesheet stylesheet) { org.w3c.dom.css.CSSRuleList rl = cssSheet.getCssRules();
private void pullRulesets(CSSRuleList rl, Stylesheet stylesheet, StylesheetInfo sheetInfo) {
private void pullRulesets(org.w3c.dom.css.CSSStyleSheet cssSheet, Stylesheet stylesheet) { org.w3c.dom.css.CSSRuleList rl = cssSheet.getCssRules(); int nr = rl.getLength(); for (int i = 0; i < nr; i++) { if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) { ...
if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) {
if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.STYLE_RULE) { stylesheet.addRuleset(new Ruleset((org.w3c.dom.css.CSSStyleRule) rl.item(i), stylesheet.getOrigin())); } else if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) {
private void pullRulesets(org.w3c.dom.css.CSSStyleSheet cssSheet, Stylesheet stylesheet) { org.w3c.dom.css.CSSRuleList rl = cssSheet.getCssRules(); int nr = rl.getLength(); for (int i = 0; i < nr; i++) { if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) { ...
MediaList media = cssir.getMedia();
MediaList mediaList = cssir.getMedia(); String media = mediaList.getMediaText(); if (media.equals("")) media = sheetInfo.getMedia();
private void pullRulesets(org.w3c.dom.css.CSSStyleSheet cssSheet, Stylesheet stylesheet) { org.w3c.dom.css.CSSRuleList rl = cssSheet.getCssRules(); int nr = rl.getLength(); for (int i = 0; i < nr; i++) { if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) { ...
info.setMedia(media.getMediaText());
info.setMedia(media);
private void pullRulesets(org.w3c.dom.css.CSSStyleSheet cssSheet, Stylesheet stylesheet) { org.w3c.dom.css.CSSRuleList rl = cssSheet.getCssRules(); int nr = rl.getLength(); for (int i = 0; i < nr; i++) { if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) { ...
} else if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.STYLE_RULE) { stylesheet.addRuleset(new Ruleset((org.w3c.dom.css.CSSStyleRule) rl.item(i), stylesheet.getOrigin()));
} else if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.MEDIA_RULE) { CSSMediaRule cssmr = (CSSMediaRule) rl.item(i); StylesheetInfo info = new StylesheetInfo(); info.setMedia(cssmr.getMedia().getMediaText()); info.setOrigin(stylesheet.getOrigin()); info.setType("text/css"); Stylesheet mr = new Stylesheet(info); in...
private void pullRulesets(org.w3c.dom.css.CSSStyleSheet cssSheet, Stylesheet stylesheet) { org.w3c.dom.css.CSSRuleList rl = cssSheet.getCssRules(); int nr = rl.getLength(); for (int i = 0; i < nr; i++) { if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) { ...
if (consumer != null)
public void setDimensions(int width, int height) { consumer.setDimensions(this.width, this.height); }
if (consumer != null)
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize) { Rectangle filterBounds = new Rectangle(this.x, this.y, this.width, this.height); Rectangle pixelBounds = new Rectangle(x, y, w, h); if (filterBounds.intersects...
if (consumer != null)
public void setProperties(Hashtable props) { props.put("filters", "CropImageFilter"); consumer.setProperties(props); }
else {
/*already done else {
private void expandProperty(String prop, CSSStyleRule rule) { if( prop.equals("color") || prop.equals("background-color") || prop.equals("border-color")) { String value = rule.getStyle().getPropertyValue(prop); rule.getStyle().setProperty(prop,getColorHex(...
}
}*/
private void expandProperty(String prop, CSSStyleRule rule) { if( prop.equals("color") || prop.equals("background-color") || prop.equals("border-color")) { String value = rule.getStyle().getPropertyValue(prop); rule.getStyle().setProperty(prop,getColorHex(...
String prop = rule.getStyle().item(i);
props[i] = rule.getStyle().item(i); cssValues[i] = rule.getStyle().getPropertyValue(props[i]); cssPrios[i] = rule.getStyle().getPropertyPriority(props[i]); } for(int i=0; i<length; i++) { String prop = props[i]; rule.getStyle().setProperty(prop, cssValues[i], cssPrios[i]);
public CSSStyleRule normalize(CSSStyleRule rule) { int length = rule.getStyle().getLength(); //HACK: we need to rewrite all properties in expandProperty //that way, we keep good cascade in case some fool redefined part of a shorthand-property //The good solution would be to create a new ...
timeout -= System.currentTimeMillis() - startTimestamp;
if (timeout != 0) timeout -= System.currentTimeMillis() - startTimestamp;
public Message receive(long timeout) throws JMSException, InterruptedException { long startTimestamp = System.currentTimeMillis(); // make sure the current state allows receiving synchronized(this) { if (listener != null) { throw new JBossJMSExceptio...
debugShow.add( new JCheckBoxMenuItem( new FontMetricsAction() ) );
public void createLayout() { file.add( root.actions.open_file ); file.add( root.actions.quit ); add( file ); edit.add( root.actions.cut ); edit.add( root.actions.copy ); edit.add( root.actions.paste ); add( edit ); view.add( view_source ); add( view ); ...
private URL eezeHelp() throws IOException {
private URL eezeHelp() {
private URL eezeHelp() throws IOException { return this.getClass().getClassLoader().getResource("eeze/eeze_help.html"); }
String name = JOptionPane.showInputDialog(this, "Please specify a new workflow name");
String name = JOptionPane.showInputDialog("Create Workflow", "Please specify a new workflow name"); if(name==null) return;
public void actionPerformed(ActionEvent e) { String name = JOptionPane.showInputDialog(this, "Please specify a new workflow name"); try { if(currentWorkspace.getWorkflow(name)!=null) { JOptionPane.showMessageDialog((Component)e.getSource(), "A workflow with the name " + name + " already exi...
drainDestination(cf, queue);
public void setUp() throws Exception { super.setUp(); ServerManagement.init("all"); initialContext = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); ServerManagement.undeployQueue("Queue"); ServerManagemen...
else
if (! (port.getParent() instanceof JScrollPane) )
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
}
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
ensureResolved(isHaltonfailure());
_organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); ensureResolved(isHaltonfailure(), getOrganisation(), getModule());
protected void prepareAndCheck() { Ivy ivy = getIvyInstance(); ensureResolved(isHaltonfailure()); _conf = getProperty(_conf, ivy, "ivy.resolved.configurations"); if (_conf.equals("*")) { _conf = getProperty(ivy, "ivy.resolved.configurations"); } _organisa...
if (_conf.equals("*")) {
if ("*".equals(_conf)) {
protected void prepareAndCheck() { Ivy ivy = getIvyInstance(); ensureResolved(isHaltonfailure()); _conf = getProperty(_conf, ivy, "ivy.resolved.configurations"); if (_conf.equals("*")) { _conf = getProperty(ivy, "ivy.resolved.configurations"); } _organisa...
throw new BuildException("no organisation provided for ivy cachefileset: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
throw new BuildException("no organisation provided for ivy cache task: It can either be set explicitely via the attribute 'organisation' or via 'ivy.organisation' property or a prior call to <resolve/>");
protected void prepareAndCheck() { Ivy ivy = getIvyInstance(); ensureResolved(isHaltonfailure()); _conf = getProperty(_conf, ivy, "ivy.resolved.configurations"); if (_conf.equals("*")) { _conf = getProperty(ivy, "ivy.resolved.configurations"); } _organisa...
throw new BuildException("no module name provided for ivy cachefileset: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>");
throw new BuildException("no module name provided for ivy cache task: It can either be set explicitely via the attribute 'module' or via 'ivy.module' property or a prior call to <resolve/>"); } if (_conf == null) { throw new BuildException("no conf provided for ivy cache task: It can either be set explicitely via the a...
protected void prepareAndCheck() { Ivy ivy = getIvyInstance(); ensureResolved(isHaltonfailure()); _conf = getProperty(_conf, ivy, "ivy.resolved.configurations"); if (_conf.equals("*")) { _conf = getProperty(ivy, "ivy.resolved.configurations"); } _organisa...
SetGridSizeWidthHandler(WorkflowGraph graph, Point location, int gridSize, String name) { super(name); this.graph = graph; this.location = location; this.iSize = gridSize; }
SetGridSizeWidthHandler(WorkflowGraph graph, int gridSize, String name) { super(name); this.graph = graph; this.iSize = gridSize; }
SetGridSizeWidthHandler(WorkflowGraph graph, Point location, int gridSize, String name) { super(name); this.graph = graph; this.location = location; this.iSize = gridSize; }
Object second = contentList.size() > 1 ? contentList.get(0) : null;
Object second = contentList.size() > 1 ? contentList.get(1) : null;
private static int pushPseudoClasses(LayoutContext c, List contentList) { int result = 0; Object first = contentList.size() > 0 ? contentList.get(0) : null; Object second = contentList.size() > 1 ? contentList.get(0) : null; if (first instanceof FirstLineStyle) { ...
c.getFirstLettersTracker().addStyle(((FirstLetterStyle)first).getStyle()); result++; } else if (second instanceof FirstLetterStyle) { c.getFirstLettersTracker().addStyle(((FirstLetterStyle)second).getStyle());
c.getFirstLettersTracker().addStyle(((FirstLetterStyle) first).getStyle());
private static int pushPseudoClasses(LayoutContext c, List contentList) { int result = 0; Object first = contentList.size() > 0 ? contentList.get(0) : null; Object second = contentList.size() > 1 ? contentList.get(0) : null; if (first instanceof FirstLineStyle) { ...
layers.push(layer);
pushLayer(layer);
public void pushLayer(Box master) { Layer layer = null; if (rootLayer == null) { layer = new Layer(master); rootLayer = layer; } else { Layer parent = getLayer(); if (master.getStyle().isFixed() || master.getStyle().isAlternateFlow...
Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(c.getExtents().x,c.getExtents().y, cell_box.width, 100)); Layout layout = LayoutFactory.getLayout(cell.node); Box cell_contents = layout.layout(c,(Element)cell_box.node); cell_box.sub_box = cell_contents; cell_box.height = cell_box.sub_box.height; column_count ...
Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(c.getExtents().x,c.getExtents().y, cell_box.width, 100)); Layout layout = LayoutFactory.getLayout(cell.node); c.setSubBlock(true); Box cell_contents = layout.layout(c,(Element)cell_box.node); c.setSubBlock(false); cell_box.sub_box = cell_contents; cell_box.h...
public Box calculateBoxes(int avail_width, TableBox box, Context c, Table table) { box.width = avail_width; box.height = 100; box.x = 5; box.y = 5; // create a dummy prev row RowBox prev_row = new RowBox(0,0,0,0); int max_width = 0; // loop thr...
try {
public Box layout(Context c, Element elem) { try { //u.p("\n====\nLayout"); // create the table box TableBox table_box = (TableBox)createBox(c, elem); // set up the border spacing float border_spacing = c.css.getFloatProperty(elem, ...
fixed_width = (int)c.css.getFloatProperty(elem, "width", false);
fixed_width = (int)c.css.getFloatProperty(elem, "width", c.getExtents().width, false);
public Box layout(Context c, Element elem) { try { //u.p("\n====\nLayout"); // create the table box TableBox table_box = (TableBox)createBox(c, elem); // set up the border spacing float border_spacing = c.css.getFloatProperty(elem, ...
} catch (Exception ex) { u.p(ex); return null; }
public Box layout(Context c, Element elem) { try { //u.p("\n====\nLayout"); // create the table box TableBox table_box = (TableBox)createBox(c, elem); // set up the border spacing float border_spacing = c.css.getFloatProperty(elem, ...
nodeId = in.readUTF();
nodeId = in.readInt();
public void read(DataInputStream in) throws IOException { nodeId = in.readUTF(); }
out.writeUTF(nodeId);
out.writeInt(nodeId);
public void write(DataOutputStream out) throws IOException { out.writeUTF(nodeId); }
if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); }
if (log.isTraceEnabled()) { log.trace("message " + r + " is already a reference"); }
public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); } return (MessageReference)r; } MessageReference ref = super.getReference(r.getMessageID()); if (ref != nul...
ref = super.createReference(r);
ref = super.createReference((Message)r);
public MessageReference reference(Routable r) { if (r.isReference()) { if (log.isTraceEnabled()) { log.trace("routable " + r + " is already a reference"); } return (MessageReference)r; } MessageReference ref = super.getReference(r.getMessageID()); if (ref != nul...
bindPort = PortUtil.findFreePort("localhost");
public JMSRemotingConnection(String serverLocatorURI) throws Throwable { callbackManager = new CallbackManager(); id = new GUID().toString(); thisAddress = InetAddress.getLocalHost().getHostAddress(); bindPort = PortUtil.findFreePort("localhost"); serverLocator = ne...
throw new JBossJMSException("Cannot start callbackserver after " + MAX_RETRIES + " retries", e);
final String msg = "Cannot start callbackserver after " + MAX_RETRIES + " retries"; log.error(msg, e); throw new JBossJMSException(msg, e);
public JMSRemotingConnection(String serverLocatorURI) throws Throwable { callbackManager = new CallbackManager(); id = new GUID().toString(); thisAddress = InetAddress.getLocalHost().getHostAddress(); bindPort = PortUtil.findFreePort("localhost"); serverLocator = ne...
"socketTimeout=0";
"socketTimeout=0&" + "socket.check_connection=false";
protected void setUpConnection() throws Throwable { if (log.isTraceEnabled()) { log.trace("Connecting with server URI:" + serverLocator); } String params = "/?marshaller=org.jboss.jms.server.remoting.JMSWireFormat&" + "unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat&" ...
log.info("Starting callback server with uri:" + callbackServerLocator.getLocatorURI());
protected void setUpConnection() throws Throwable { if (log.isTraceEnabled()) { log.trace("Connecting with server URI:" + serverLocator); } String params = "/?marshaller=org.jboss.jms.server.remoting.JMSWireFormat&" + "unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat&" ...
log.error("Linked exception is: " + linked);
log.error("Linked exception is: ", linked);
public Object invoke(Invocation invocation) throws Throwable { try { return invocation.invokeNext(); } catch(JMSException e) { if (trace) { log.trace("Caught JMSException:" + e); } Exception linked = e.getLinkedException(); if (linked != null) ...
throw new JBossJMSException("Caught exception", e);
throw new MessagingJMSException("Caught exception", e);
public Object invoke(Invocation invocation) throws Throwable { try { return invocation.invokeNext(); } catch(JMSException e) { if (trace) { log.trace("Caught JMSException:" + e); } Exception linked = e.getLinkedException(); if (linked != null) ...
if (e.getCause() != null)
Throwable e2 = e.getCause(); if (e2 != null)
private void logCause(Throwable e) { if (e.getCause() != null) { log.error("Cause of exception:", e.getCause()); } }
log.error("Cause of exception:", e.getCause());
log.error("Cause of exception:", e2); logCause(e2);
private void logCause(Throwable e) { if (e.getCause() != null) { log.error("Cause of exception:", e.getCause()); } }
drainDestination(cf, queue);
public void setUp() throws Exception { super.setUp(); ServerManagement.init("all"); initialContext = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory"); ServerManagement.undeployQueue("Queue"); ServerMana...
if (result == null && count > 0) return getView(count - 1);
protected View getViewAtPoint(int x, int y, Rectangle r) { View result = null; int count = getViewCount(); Rectangle copy = new Rectangle(r); for (int i = 0; i < count; ++i) { copy.setBounds(r); childAllocation(i, r); if (copy.contains(x, y)) { result = getVi...
if (!copy.isEmpty())
if (!copy.isEmpty() && g.hitClip(copy.x, copy.y, copy.width, copy.height))
public void paint(Graphics g, Shape a) { // Adjust size if the size is changed. Rectangle bounds = a.getBounds(); if (bounds.width != getWidth() || bounds.height != getHeight()) setSize(bounds.width, bounds.height); Rectangle inside = getInsideAllocation(a); Rectangle copy = new Rectangle(inside)...
if (childIndex != -1) {
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); Shape ret = null; if (childIndex != -1) { View child = getView(childIndex); Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc...
} else ret = createDefaultLocation(a, bias);
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); Shape ret = null; if (childIndex != -1) { View child = getView(childIndex); Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc...
{
public final int getOutputSize(int inputLength) throws IllegalStateException { if (cipherSpi == null) { return inputLength; } if (state != ENCRYPT_MODE && state != DECRYPT_MODE) { throw new IllegalStateException("neither encrypting nor decrypting"); } return cipherSpi.engin...
} if (state != ENCRYPT_MODE && state != DECRYPT_MODE) { throw new IllegalStateException("neither encrypting nor decrypting"); }
public final int getOutputSize(int inputLength) throws IllegalStateException { if (cipherSpi == null) { return inputLength; } if (state != ENCRYPT_MODE && state != DECRYPT_MODE) { throw new IllegalStateException("neither encrypting nor decrypting"); } return cipherSpi.engin...
bodyExpandHack(body_box,view_height); intrinsic_size.height = view_height;
public void startLayout(Graphics g) { this.removeAll(); if (g == null) { return; } if (doc == null) { return; } // set up CSS Context c = newContext((Graphics2D) g); //getContext().setMaxWidth(0); this.layout_context = c; ...
}
private InlineBox calculateInline( Context c, Node node, int avail, int max_width, LineBox line, InlineBox prev, Element containing_block, InlineBox prev_align ) { // calculate the starting index int start = 0; // if this is another box from the same node as t...
TextUtil.stripWhitespace( c, current_node, elem );
if(!Configuration.isTrue("xr.layout.whitespace.experimental",false)) { TextUtil.stripWhitespace( c, current_node, elem ); }
public Box layoutChildren( Context c, Box box ) { //u.p("starting to lay out the children"); if ( LayoutUtil.isHiddenNode( box.getElement(), c ) ) { return box; } if ( !box.isAnonymous() ) { if ( LayoutUtil.isBlockLayout( box.getElement(), c ) ) { // ...
if ( prev_inline.end_index >= current_node.getNodeValue().length() ) { break;
if(Configuration.isTrue("xr.layout.whitespace.experimental",false)) { if ( prev_inline.end_index >= prev_inline.getMasterText().length()) { break; } } else { if ( prev_inline.end_index >= current_node.getNodeValue().length() ) { break; }
public Box layoutChildren( Context c, Box box ) { //u.p("starting to lay out the children"); if ( LayoutUtil.isHiddenNode( box.getElement(), c ) ) { return box; } if ( !box.isAnonymous() ) { if ( LayoutUtil.isBlockLayout( box.getElement(), c ) ) { // ...
return null;
return new AccessibleJFileChooser();
public AccessibleContext getAccessibleContext() { return null; }
log.info(this + " receiving " + msgs.size() + " message(s) from the remoting layer");
public HandleMessageResponse handleMessage(List msgs) throws HandleCallbackException { if (trace) { log.trace(this + " receiving " + msgs.size() + " message(s) from the remoting layer"); } synchronized (mainLock) { if (closed) { ...
anonProducer.send(topic2, m1);
topicProducer.send(m1);
public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(1000); anonProducer.send(topic2, m1); } catch(Exception e) { log.error(e); ...
}
private void checkName(String name) { if (name == null) throw new IllegalArgumentException("Name must not be null."); if (name.equals("")) throw new IllegalArgumentException("Name must not be an empty String."); }
int numSessions, int numMessages, long timeToStart, String selector)
int numSessions, int numMessages, String selector)
public BrowserJob(String slaveURL, Properties jndiProperties, String destinationName, String connectionFactoryJndiName, int numConnections, int numSessions, int numMessages, long timeToStart, String selector) { super (slaveURL, jndiProperties, destinationName, connectionFactoryJndiName, numCon...
numMessages, timeToStart);
numMessages);
public BrowserJob(String slaveURL, Properties jndiProperties, String destinationName, String connectionFactoryJndiName, int numConnections, int numSessions, int numMessages, long timeToStart, String selector) { super (slaveURL, jndiProperties, destinationName, connectionFactoryJndiName, numCon...
public boolean add(Receiver receiver)
public void add(Delivery delivery)
public boolean add(Receiver receiver) { throw new NotYetImplementedException(); }
layoutMgr.addLayoutComponent(null, comp);
layoutMgr.addLayoutComponent("", comp);
protected void addImpl(Component comp, Object constraints, int index) { synchronized (getTreeLock ()) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this)...
if (listener == null) return; if (changeSupport == null) changeSupport = new PropertyChangeSupport (this); changeSupport.addPropertyChangeListener (listener);
super.addPropertyChangeListener(listener);
public void addPropertyChangeListener (PropertyChangeListener listener) { if (listener == null) return; if (changeSupport == null) changeSupport = new PropertyChangeSupport (this); changeSupport.addPropertyChangeListener (listener); }
repaint();
public void remove(int index) { synchronized (getTreeLock ()) { Component r = component[index]; ComponentListener[] list = r.getComponentListeners(); for (int j = 0; j < list.length; j++) r.removeComponentListener(list[j]); if (r.isShowing()) r.removeNo...
Rectangle oldClip = gfx.getClipBounds(); if (oldClip == null) oldClip = bounds;
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle oldClip = gfx.getClipBounds(); if (oldClip == null) oldClip = bounds; Rectangle clip = oldClip.intersection(bounds); if (clip.isEmpty()) return; b...
Rectangle clip = oldClip.intersection(bounds);
if(!gfx.hitClip(bounds.x,bounds.y, bounds.width, bounds.height)) return;
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle oldClip = gfx.getClipBounds(); if (oldClip == null) oldClip = bounds; Rectangle clip = oldClip.intersection(bounds); if (clip.isEmpty()) return; b...
if (clip.isEmpty()) return; boolean clipped = false; boolean translated = false;
Graphics g2 = gfx.create(bounds.x, bounds.y, bounds.width, bounds.height);
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle oldClip = gfx.getClipBounds(); if (oldClip == null) oldClip = bounds; Rectangle clip = oldClip.intersection(bounds); if (clip.isEmpty()) return; b...
gfx.setClip(clip.x, clip.y, clip.width, clip.height); clipped = true; gfx.translate(bounds.x, bounds.y); translated = true; visitor.visit(comp, gfx);
visitor.visit(comp, g2);
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle oldClip = gfx.getClipBounds(); if (oldClip == null) oldClip = bounds; Rectangle clip = oldClip.intersection(bounds); if (clip.isEmpty()) return; b...
if (translated) gfx.translate (-bounds.x, -bounds.y); if (clipped) gfx.setClip (oldClip.x, oldClip.y, oldClip.width, oldClip.height);
g2.dispose();
private void visitChild(Graphics gfx, GfxVisitor visitor, Component comp) { Rectangle bounds = comp.getBounds(); Rectangle oldClip = gfx.getClipBounds(); if (oldClip == null) oldClip = bounds; Rectangle clip = oldClip.intersection(bounds); if (clip.isEmpty()) return; b...
MethodInvocation mi = (MethodInvocation)invocation;
JMSMethodInvocation mi = (JMSMethodInvocation)invocation; JMSInvocationHandler handler = mi.getHandler();
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; Method m = mi.getMethod(); if (m.getName().equals("createConsumerDelegate")) { // register/unregister...
if (m.getName().equals("createConsumerDelegate"))
String methodName = m.getName(); SimpleMetaData invocationMetaData = invocation.getMetaData(); SimpleMetaData handlerMetaData = handler.getMetaData(); if ("createConsumerDelegate".equals(methodName))
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; Method m = mi.getMethod(); if (m.getName().equals("createConsumerDelegate")) { // register/unregister...
SimpleMetaData metaData = invocation.getMetaData();
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; Method m = mi.getMethod(); if (m.getName().equals("createConsumerDelegate")) { // register/unregister...
client.addListener(msgHandler, Remoting.getCallbackServer().getLocator());
Connector callbackServer = Remoting.getCallbackServer(); handlerMetaData.addMetaData(JMSAdvisor.JMS, JMSAdvisor.REMOTING_CALLBACK_SERVER, callbackServer, PayloadKey.TRANSIENT); InvokerLocator invokerLocator = callbackServer.getLocator(); log.debug("Callback server listening on " + invokerLocator); client.addListener(m...
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; Method m = mi.getMethod(); if (m.getName().equals("createConsumerDelegate")) { // register/unregister...
metaData.addMetaData(InvokerInterceptor.REMOTING, InvokerInterceptor.CLIENT, client, PayloadKey.TRANSIENT);
invocationMetaData.addMetaData(InvokerInterceptor.REMOTING, InvokerInterceptor.CLIENT, client, PayloadKey.TRANSIENT);
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; Method m = mi.getMethod(); if (m.getName().equals("createConsumerDelegate")) { // register/unregister...
metaData.addMetaData(JMSAdvisor.JMS, JMSAdvisor.REMOTING_SESSION_ID, client.getSessionId(), PayloadKey.AS_IS);
invocationMetaData.addMetaData(JMSAdvisor.JMS, JMSAdvisor.REMOTING_SESSION_ID, client.getSessionId(), PayloadKey.AS_IS);
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; Method m = mi.getMethod(); if (m.getName().equals("createConsumerDelegate")) { // register/unregister...
else if ("closing".equals(methodName)) { Connector callbackServer = (Connector)handlerMetaData. getMetaData(JMSAdvisor.JMS, JMSAdvisor.REMOTING_CALLBACK_SERVER); if (callbackServer != null) { InvokerLocator locator = callbackServer.getLocator(); callbackServer.stop(); handlerMetaData.removeMetaData(JMSAdvisor.JMS, JM...
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; Method m = mi.getMethod(); if (m.getName().equals("createConsumerDelegate")) { // register/unregister...
init();
public JEditorPane() { setEditorKit(createDefaultEditorKit()); }
return new PlainEditorKit();
EditorKit e = null; String className = (String)registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { } } return e;
public static EditorKit createEditorKitForContentType(String type) { return new PlainEditorKit(); }
return "text/plain";
return (String) registerMap.get(type);
public static String getEditorKitClassNameForContentType(String type) { return "text/plain"; }
return editorKit;
EditorKit e = (EditorKit) editorMap.get(type); if (e == null) e = createEditorKitForContentType(type); if (e == null) e = new PlainEditorKit(); return e;
public EditorKit getEditorKitForContentType(String type) { return editorKit; }