rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
((Peer)channel).join(); ((Peer)channel2).join(); | ((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join(); | public void testRecoverableDistributedChannel_6() throws Exception { if (!channel.isRecoverable()) { // we test only recoverable channels now return; } jchannel2.connect("testGroup"); // allow the group time to form Thread.sleep(1000); assertTrue(jchannel.isConnec... |
((Peer)channel).join(); ((Peer)channel2).join(); | ((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join(); | public void testRecoverableDistributedChannel_7() throws Exception { if (!channel.isRecoverable()) { // we test only recoverable channels now return; } jchannel2.connect("testGroup"); // allow the group time to form Thread.sleep(1000); assertTrue(jchannel.isConnec... |
((Peer)channel).join(); ((Peer)channel2).join(); | ((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join(); | public void testRecoverableDistributedChannel_8() throws Exception { if (!channel.isRecoverable()) { // we test only recoverable channels now return; } jchannel2.connect("testGroup"); // allow the group time to form Thread.sleep(1000); assertTrue(jchannel.isConnec... |
((Peer)channel).join(); ((Peer)channel2).join(); | ((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join(); | public void testRecoverableDistributedChannel_8_mixed() throws Exception { if (!channel.isRecoverable()) { // we test only recoverable channels now return; } jchannel2.connect("testGroup"); // allow the group time to form Thread.sleep(1000); assertTrue(jchannel.is... |
((Peer)channel).join(); ((Peer)channel2).join(); | ((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join(); | public void testRecoverableDistributedChannel_9() throws Exception { if (!channel.isRecoverable()) { // we test only recoverable channels now return; } jchannel2.connect("testGroup"); // allow the group time to form Thread.sleep(1000); assertTrue(jchannel.isConnec... |
((Peer)channel).join(); ((Peer)channel2).join(); | ((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join(); | public void testRemoteBrowse() throws Exception { jchannel2.connect("testGroup"); // allow the group time to form Thread.sleep(1000); assertTrue(jchannel.isConnected()); assertTrue(jchannel2.isConnected()); // make sure both jchannels joined the group assertEquals(2, jchannel.get... |
public synchronized void checkInGenerator(String serverId) | public synchronized void checkInGenerator(int serverId) | public synchronized void checkInGenerator(String serverId) { Holder h = (Holder)holders.get(serverId); if (h == null) { throw new IllegalArgumentException("Cannot find generator for serverid:" + serverId); } h.refCount--; if (h.refCount == 0) { holders.remove(serv... |
Holder h = (Holder)holders.get(serverId); | Integer in = new Integer(serverId); Holder h = (Holder)holders.get(in); | public synchronized void checkInGenerator(String serverId) { Holder h = (Holder)holders.get(serverId); if (h == null) { throw new IllegalArgumentException("Cannot find generator for serverid:" + serverId); } h.refCount--; if (h.refCount == 0) { holders.remove(serv... |
holders.remove(serverId); | holders.remove(in); | public synchronized void checkInGenerator(String serverId) { Holder h = (Holder)holders.get(serverId); if (h == null) { throw new IllegalArgumentException("Cannot find generator for serverid:" + serverId); } h.refCount--; if (h.refCount == 0) { holders.remove(serv... |
public synchronized MessageIdGenerator checkOutGenerator(String serverId, | public synchronized MessageIdGenerator checkOutGenerator(int serverId, | public synchronized MessageIdGenerator checkOutGenerator(String serverId, ConnectionFactoryDelegate cfd) throws JMSException { Holder h = (Holder)holders.get(serverId); if (h == null) { h = new Holder(new MessageIdGenerator(cfd,... |
Holder h = (Holder)holders.get(serverId); | Integer in = new Integer(serverId); Holder h = (Holder)holders.get(in); | public synchronized MessageIdGenerator checkOutGenerator(String serverId, ConnectionFactoryDelegate cfd) throws JMSException { Holder h = (Holder)holders.get(serverId); if (h == null) { h = new Holder(new MessageIdGenerator(cfd,... |
holders.put(serverId, h); | holders.put(in, h); | public synchronized MessageIdGenerator checkOutGenerator(String serverId, ConnectionFactoryDelegate cfd) throws JMSException { Holder h = (Holder)holders.get(serverId); if (h == null) { h = new Holder(new MessageIdGenerator(cfd,... |
public synchronized boolean containsMessageIdGenerator(String serverId) | public synchronized boolean containsMessageIdGenerator(int serverId) | public synchronized boolean containsMessageIdGenerator(String serverId) { return holders.containsKey(serverId); } |
return holders.containsKey(serverId); | return holders.containsKey(new Integer(serverId)); | public synchronized boolean containsMessageIdGenerator(String serverId) { return holders.containsKey(serverId); } |
public ConfigConditionDescriptor(PaletteDescriptor palette, Element condition) | public ConfigConditionDescriptor(PaletteDescriptor palette) | public ConfigConditionDescriptor(PaletteDescriptor palette, Element condition) { this.palette = palette; init(condition); } |
this.palette = palette; init(condition); | this.palette = palette; | public ConfigConditionDescriptor(PaletteDescriptor palette, Element condition) { this.palette = palette; init(condition); } |
String consumerID = (String)mi.getArguments()[1]; | int consumerID = ((Integer)mi.getArguments()[1]).intValue(); | public Object handlePreDeliver(Invocation invocation) throws Throwable { SessionState state = (SessionState)getState(invocation); if (state.isTransacted()) { MethodInvocation mi = (MethodInvocation)invocation; String messageID = (String)mi.getArguments()[0]; ... |
public void route(EdgeView edge, java.util.List points) | public List route(EdgeView edgeView) | public void route(EdgeView edge, java.util.List points) { PortView sourceView = (PortView)edge.getSource(); PortView targetView = (PortView)edge.getTarget(); if(sourceView==null || targetView==null) return; WorkflowPort sourcePort = (WorkflowPort)sourceView.getCell(); WorkflowPort targetPort = (Workfl... |
PortView sourceView = (PortView)edge.getSource(); PortView targetView = (PortView)edge.getTarget(); if(sourceView==null || targetView==null) return; WorkflowPort sourcePort = (WorkflowPort)sourceView.getCell(); WorkflowPort targetPort = (WorkflowPort)targetView.getCell(); Point2D from = sourceView.getLocation(null); P... | return null; | public void route(EdgeView edge, java.util.List points) { PortView sourceView = (PortView)edge.getSource(); PortView targetView = (PortView)edge.getTarget(); if(sourceView==null || targetView==null) return; WorkflowPort sourcePort = (WorkflowPort)sourceView.getCell(); WorkflowPort targetPort = (Workfl... |
public abstract boolean isFocusTraversable(JComboBox combobox); | public abstract boolean isFocusTraversable(JComboBox c); | public abstract boolean isFocusTraversable(JComboBox combobox); |
VerticalAlign.setupVerticalAlign(c, style, box); | public static InlineBox generateReplacedInlineBox(Context c, Content content, int avail, InlineBox prev_align, LineBox curr_line) { InlineBlockBox box = new InlineBlockBox(); box.element = content.getElement(); CalculatedStyle style = c.getCurrentStyle(); // use the prev_align to calcula... | |
throw new JobExecutionException("Error Executing local job", (e.getRootCause() != null) ? e.getRootCause() : e, true); | throw new JobExecutionException("Error Executing local job", (e.getRootCause() != null) ? (Exception) e.getRootCause() : e, true); | public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { JobDataMap data = jobExecutionContext.getJobDetail().getJobDataMap(); long id = data.getLong("entryId"); int triggerId = data.getInt("triggerId"); String username = data.getString("username"); ... |
return null; | return new JobTimings(0, 0); | public Object getResult() { return null; } |
if (clientID != null) { try { conn.setClientID(clientID); } catch (Exception e) { } } | public void run() { Connection conn = null; int count = 0; try { super.setup(); conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsu... | |
0, | protected Message createMessage(byte i, boolean reliable) throws Exception { HashMap coreHeaders = generateFilledMap(true); HashMap jmsProperties = generateFilledMap(false); JBossTextMessage m = new JBossTextMessage(i, reliable, Syst... | |
c.getCurrentFont(), sample); | box.getStyle().getFont(c.getCtx()), sample); | public static LineMetrics getLineMetrics(Context c, InlineBox box) { String sample = "Test"; if ((box instanceof InlineTextBox) && !((InlineTextBox) box).getSubstring().equals("")) { sample = ((InlineTextBox) box).getSubstring(); } return c.getTextRenderer().getLineMetrics(c.g... |
c.getCurrentFont(), box.getSubstring()); | box.getStyle().getFont(c.getCtx()), box.getSubstring()); | public static Rectangle2D getTextBounds(Context c, InlineTextBox box) { return c.getTextRenderer().getLogicalBounds(c.getGraphics(), c.getCurrentFont(), box.getSubstring()); } |
public static int lineHeight(Context c) { | public static int lineHeight(Context c, Box box) { | public static int lineHeight(Context c) { CalculatedStyle style = c.getCurrentStyle(); int val = (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), c.getCurrentFont(), "Test").getHeight()); if (!style.isIdent(CSSName.LINE_HEIGHT, IdentValue.NORMAL)) { val = (int) s... |
int val = (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), c.getCurrentFont(), "Test").getHeight()); | int val = (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), box.getStyle().getFont(c.getCtx()), "Test").getHeight()); | public static int lineHeight(Context c) { CalculatedStyle style = c.getCurrentStyle(); int val = (int) Math.ceil(c.getTextRenderer().getLogicalBounds(c.getGraphics(), c.getCurrentFont(), "Test").getHeight()); if (!style.isIdent(CSSName.LINE_HEIGHT, IdentValue.NORMAL)) { val = (int) s... |
NodeList conditionNodes = conditions.getElementsByTagName("condition"); int length = conditionNodes.getLength(); | List conditionNodes = XMLUtil.getChildElements(conditions, "condition"); int length = conditionNodes.size(); | protected void init(Element conditionalResult) { super.init(conditionalResult); Element conditions = XMLUtil.getChildElement(conditionalResult, "conditions"); conditionType = conditions.getAttribute("type"); NodeList conditionNodes = conditions.getElementsByTagName("condition"); i... |
Element condition = (Element) conditionNodes.item(i); | Element condition = (Element) conditionNodes.get(i); | protected void init(Element conditionalResult) { super.init(conditionalResult); Element conditions = XMLUtil.getChildElement(conditionalResult, "conditions"); conditionType = conditions.getAttribute("type"); NodeList conditionNodes = conditions.getElementsByTagName("condition"); i... |
ValidationHelper.validate(conditions); | public void validate() throws InvalidWorkflowDescriptorException { super.validate(); if (conditions.size() == 0) { throw new InvalidWorkflowDescriptorException("Conditional result from " + ((ActionDescriptor) getParent()).getName() + " to " + getDestination() + " must have at least one cond... | |
public ConnectionStub(String objectID, InvokerLocator locator) | public ConnectionStub(String objectID, InvokerLocator locator, String serverId) | public ConnectionStub(String objectID, InvokerLocator locator) { super(objectID, locator); } |
this.serverId = serverId; | public ConnectionStub(String objectID, InvokerLocator locator) { super(objectID, locator); } | |
throw new XRRuntimeException("Could not find sibling to: " + which); | return null; | public Content getNextInFlowSibling(LayoutContext c, Content which) { for (Iterator i = getChildContent(c).iterator(); i.hasNext();) { Object obj = i.next(); if (obj == which) { while (i.hasNext()) { Object result = i.next(); if (Cont... |
throw new XRRuntimeException("Could not find sibling to: " + which); | return null; | public Content getPreviousInFlowSibling(LayoutContext c, Content which) { List children = getChildContent(c); for (int i = 0; i < children.size(); i++) { Object obj = children.get(i); if (obj == which) { for (int j = i - 1; j >= 0; j--) { Object ... |
ServerProducerEndpoint(int id, Destination jmsDestination, ServerSessionEndpoint parent) | protected ServerProducerEndpoint(int id, Destination jmsDestination, ServerSessionEndpoint parent) | ServerProducerEndpoint(int id, Destination jmsDestination, ServerSessionEndpoint parent) { this.id = id; this.jmsDestination = jmsDestination; sessionEndpoint = parent; } |
this.sessionEndpoint.producers.remove(new Integer(this.id)); | this.sessionEndpoint.removeProducerDelegate(this.id); | public void close() throws JMSException { if (closed) { throw new IllegalStateException("Producer is already closed"); } //Currently this does nothing if (trace) { log.trace("close (noop)"); } this.sessionEndpoint.producers.remove(new Integer(this.id)); JMSDis... |
sessionEndpoint.connectionEndpoint.sendMessage(m, null); | sessionEndpoint.getConnectionEndpoint().sendMessage(m, null); | public void send(Message m) throws JMSException { if (closed) { throw new IllegalStateException("Producer is closed"); } if (trace) { log.trace("Sending message: " + m); } sessionEndpoint.connectionEndpoint.sendMessage(m, null); } |
assertEquals(0, LockMap.instance.getSize()); | public void tearDown() throws Exception {// assertEquals(0, LockMap.instance.getSize()); ServerManagement.undeployQueue("Queue1"); ServerManagement.undeployQueue("Queue2"); ServerManagement.undeployQueue("Queue3"); ServerManagement.undeployQueue("Queue4"); ServerManagement... | |
if (conditions.size() > 1) { throw new InvalidWorkflowDescriptorException("A restrict-to element can only have one conditions child element"); } | public void validate() throws InvalidWorkflowDescriptorException { ValidationHelper.validate(conditions); } | |
if (line.firstLinePseudo != null) { line.firstLinePseudo.paintBackground(c, line, inline, BorderPainter.TOP + BorderPainter.BOTTOM); } | public static void paintBackground(RenderingContext c, LineBox line, InlineBox inline) { if (inline.getInlineElement() != null) { inline.getInlineElement().paintBackground(c, line, inline, BorderPainter.TOP + BorderPainter.BOTTOM); } ... | |
if (line.firstLinePseudo != null) { line.firstLinePseudo.paintTextDecoration(c, line, inline); line.firstLinePseudo.untranslateRelative(c, line.isFirstLine); } | static int paintInline(RenderingContext c, InlineBox ib, int lx, int ly, LineBox line, int padX) { if (ib.pushstyles > 0) padX = ib.getInlineElement().handleStart(c, line, ib, padX, ib.pushstyles); if (ib instanceof InlineBlockBox) { c.translate(line.x, line.y ... | |
TransactionRepository tr = new TransactionRepository(pm, new IdManager("TRANSACTION_ID", 10, pm)); | IdManager idm = new IdManager("TRANSACTION_ID", 10, pm); idm.start(); TransactionRepository tr = new TransactionRepository(pm, idm); | public void testDoneIsSetWithTransaction() throws Throwable { //Calling acknowledge on a SimpleDelivery //Should always result in done being set to true, //even if there is a transaction present. //Otherwise we can end up with a race condition where //the message is acked when still in fli... |
ServerManagement.deployQueue("Queue"); | ServerManagement.deployQueue("MultipleServerInvocationHandlerTestQueue"); | protected void setUp() throws Exception { super.setUp(); ServerManagement.start("all"); ic = new InitialContext(ServerManagement.getJNDIEnvironment()); // stop the Messaging server and re-start it after I register an extra remoting invocation // handler with the connector ServerManage... |
ServerManagement.undeployQueue("Queue"); | ServerManagement.undeployQueue("MultipleServerInvocationHandlerTestQueue"); | protected void tearDown() throws Exception { // remove the test invocation handler ServerManagement.removeServerInvocationHandler("DEFAULT_INVOCATION_HANDLER"); ServerManagement.undeployQueue("Queue"); ic.close(); super.tearDown(); } |
Queue queue = (Queue)ic.lookup("/queue/Queue"); | Queue queue = (Queue)ic.lookup("/queue/MultipleServerInvocationHandlerTestQueue"); | public void testMessageRoundTrip() throws Exception { Set subsystems = ServerManagement.getConnectorSubsystems(); assertEquals(2, subsystems.size()); assertTrue(subsystems.contains("DEFAULT_INVOCATION_HANDLER")); assertTrue(subsystems.contains(ServerPeer.REMOTING_JMS_SUBSYSTEM)); Connectio... |
box.setChildrenExceedBounds(true); | public static Box generateAbsoluteBox(Context c, Content content) { //Uu.p("generate absolute block inline box: avail = " + content); Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents(new Rectangle(oe)); Box box = Boxing.layout(c, content); //Uu.p("got a bl... | |
ResolvedModuleRevision rmr = findModuleInCache(data, mrid); if (rmr != null) { if (rmr.getDescriptor().isDefault() && rmr.getResolver() != this && isResolved(data, mrid)) { Message.verbose("\t"+getName()+": found revision in cache: "+mrid+" (resolved by "+rmr.getResolver().getName()+"): but it's a default one, maybe we... | cachedRmr = findModuleInCache(data, mrid); checkedCache = true; if (cachedRmr != null) { if (cachedRmr.getDescriptor().isDefault() && cachedRmr.getResolver() != this) { Message.verbose("\t"+getName()+": found revision in cache: "+mrid+" (resolved by "+cachedRmr.getResolver().getName()+"): but it's a default one, maybe ... | public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { DependencyDescriptor systemDd = dd; dd = fromSystem(dd); clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDa... |
return toSystem(rmr); | return toSystem(cachedRmr); | public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { DependencyDescriptor systemDd = dd; dd = fromSystem(dd); clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDa... |
if (rmr.getDescriptor().isDefault() && rmr.getResolver() != this && isResolved(data, resolvedMrid)) { | if (rmr.getDescriptor().isDefault() && rmr.getResolver() != this) { | public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { DependencyDescriptor systemDd = dd; dd = fromSystem(dd); clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDa... |
TestWorkflow.configFile = "osworkflow.xml"; | TestWorkflow.configFile = "/osworkflow.xml"; | protected void setUp() throws Exception { TestWorkflow.configFile = "osworkflow.xml"; workflow = new TestWorkflow("testuser"); } |
long id = workflow.initialize("file:double.xml", 1, new HashMap()); | long id = workflow.initialize(getClass().getClassLoader().getResource("/double.xml").toString(), 1, new HashMap()); | public void testDoubleFunctionExecution() throws Exception { long id = workflow.initialize("file:double.xml", 1, new HashMap()); Map inputs = new HashMap(); inputs.put("test", this); workflow.doAction(id, 3, inputs); assertEquals("function executed unexpected number of times", 2, counter); ... |
/*Enumeration e = netIf.getInetAddresses(); | public void setNetworkInterface(NetworkInterface netIf) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); // @vm-specific Set network interface via extended option getImpl().setOption(ExSocketOptions.SO_TRANSMIT_IF, netIf); /*Enumeration e = netIf.getIn... | |
url = new URL(href); | } else url = new URL(href); | public void parseStylesheet( String href ) throws IOException { try { // HACK: need clean way to check if this is local reference...local references will need to be resolved to server reference, won't they? Reader reader = null; try { URL url... |
System.err.println("Can't figure out how to load stylesheet '" + href + "'."); | System.err.println("Can't figure out how to load stylesheet '" + href + "' with base URL "+_context.getBaseURL()); | public void parseStylesheet( String href ) throws IOException { try { // HACK: need clean way to check if this is local reference...local references will need to be resolved to server reference, won't they? Reader reader = null; try { URL url... |
callbackClient.setSubsystem(JMSRemotingConnection.JMS_CALLBACK_SUBSYSTEM); | callbackClient.setSubsystem(CallbackServerFactory.JMS_CALLBACK_SUBSYSTEM); | public void setCallbackClient(Client client) { callbackClient = client; // TODO not sure if this is the best way to do this, but the callbackClient needs to have // its "subsystem" set, otherwise remoting cannot find the associated // ServerInvocationHandler on the callback server ... |
method.setCompiledCode(code, level); | method.addCompiledCode(code, level); | protected final CompiledMethod doCompileAbstract(VmMethod method, NativeStream nos, int level, boolean isBootstrap) { if (isBootstrap) { //System.out.println("Abstraxct method " + method); final CompiledMethod cm = new CompiledMethod(level); final AbstractX86Stream os = (AbstractX86Stream) nos; // Create the ... |
context = new X86CompilerContext(loader, Vm.getVm().getHeapManager()); | context = new X86CompilerContext(loader, Vm.getVm().getHeapManager(), getMagic()); | public final void initialize(VmClassLoader loader) { if (context == null) { context = new X86CompilerContext(loader, Vm.getVm().getHeapManager()); } } |
RemoveDeliveryCallback callback = new RemoveDeliveryCallback(d); | public void acknowledge(Delivery d, Transaction tx) throws Throwable { //Transactional so remove after tx commit RemoveDeliveryCallback callback = new RemoveDeliveryCallback(d); tx.addCallback(callback); if (trace) { log.trace(this + " added " + d + " to memory on transaction " + tx... | |
tx.addCallback(callback); | this.getCallback(tx).addDelivery(d); | public void acknowledge(Delivery d, Transaction tx) throws Throwable { //Transactional so remove after tx commit RemoveDeliveryCallback callback = new RemoveDeliveryCallback(d); tx.addCallback(callback); if (trace) { log.trace(this + " added " + d + " to memory on transaction " + tx... |
AddReferenceCallback callback = new AddReferenceCallback(ref); tx.addCallback(callback); | this.getCallback(tx).addRef(ref); | public void addReference(MessageReference ref, Transaction tx) throws Throwable { if (trace) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); } if (ref.isReliable() && !acceptReliableMessages) { // this transaction has no chance to succeed, since a reliable mes... |
if (this.loadFromOrderingValue == 0) { this.loadFromOrderingValue = minOrdering; } else { if (minOrdering < loadFromOrderingValue) { loadFromOrderingValue = minOrdering; } } | protected void flushDownCache() throws Exception { if (trace) { log.trace(this + " flushing " + downCache.size() + " refs from downcache"); } //Non persistent refs or persistent refs in a non recoverable state won't already be in the db //so they need to be inserted //Persiste... | |
loadFromOrderingValue = pm.getMinOrdering(channel.getChannelID()); | public void load() throws Exception { if (trace) { log.trace(this + " loading channel state"); } synchronized (refLock) { refsInStorage = pm.getNumberOfUnloadedReferences(channel.getChannelID()); if (refsInStorage > 0) { load(Mat... | |
return (known & KNOWN_CSIZE) != 0 ? compressedSize & 0xffffffffL : -1L; | return compressedSize; | public long getCompressedSize() { return (known & KNOWN_CSIZE) != 0 ? compressedSize & 0xffffffffL : -1L; } |
if ((csize & 0xffffffff00000000L) != 0) throw new IllegalArgumentException(); this.compressedSize = (int) csize; this.known |= KNOWN_CSIZE; | this.compressedSize = csize; | public void setCompressedSize(long csize) { if ((csize & 0xffffffff00000000L) != 0) throw new IllegalArgumentException(); this.compressedSize = (int) csize; this.known |= KNOWN_CSIZE; } |
Point click = event.getPoint(); int index = locationToIndex(list, click); if (index == -1) return; if (!event.isShiftDown() && !event.isControlDown()) list.setSelectedIndex(index); list.ensureIndexIsVisible(list.getLeadSelectionIndex()); | public void mouseDragged(MouseEvent event) { // TODO: What should be done here, if anything? } | |
public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException { | public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args, PropertySet ps) throws WorkflowException { | public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException { String location = (String) args.get(AbstractWorkflow.JNDI_LOCATION); if (location == null) { throw new WorkflowException(AbstractWorkflow.JNDI_LOCATION + " argument is null"); ... |
return r.registerVariable(context, entry, args); | return r.registerVariable(context, entry, args, ps); | public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException { String location = (String) args.get(AbstractWorkflow.JNDI_LOCATION); if (location == null) { throw new WorkflowException(AbstractWorkflow.JNDI_LOCATION + " argument is null"); ... |
public boolean cancel(Delivery d) throws Throwable | public void cancel(Delivery d) throws Throwable | public boolean cancel(Delivery d) throws Throwable { throw new NotYetImplementedException(); } |
void registerConnection(String clientConnectionID, ServerConnectionEndpoint endpoint); | void registerConnection(String clientSessionId, ServerConnectionEndpoint endpoint); | void registerConnection(String clientConnectionID, ServerConnectionEndpoint endpoint); |
ServerConnectionEndpoint unregisterConnection(String clientConnectionID); | ServerConnectionEndpoint unregisterConnection(String clientSessionId); | ServerConnectionEndpoint unregisterConnection(String clientConnectionID); |
bounds = getPathBounds(tree, path); | Rectangle bounds = getPathBounds(tree, path); | public void mousePressed(MouseEvent e) { Point click = e.getPoint(); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { bounds = getPathBounds(tree, path); int row = getRowForPath(tree, path); boolean cntlClick = isLocationInExp... |
tree.scrollPathToVisible(path); | public void mousePressed(MouseEvent e) { Point click = e.getPoint(); TreePath path = getClosestPathForLocation(tree, click.x, click.y); if (path != null) { bounds = getPathBounds(tree, path); int row = getRowForPath(tree, path); boolean cntlClick = isLocationInExp... | |
public Rectangle getNodeDimensions(Object value, int row, int depth, | public Rectangle getNodeDimensions(Object cell, int row, int depth, | public Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) { return null; } |
String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(f); if (s != null) { size.x = getRowX(row, depth); size.width = SwingUtilities.computeStringWidth(fm, s); size.height = fm.getHeight(); } return size; | public Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) { return null; } | |
return depth * rightChildIndent; | protected int getRowX(int row, int depth) { return 0; } | |
updateCurrentVisiblePath(); | public void treeStructureChanged(TreeModelEvent e) { validCachedPreferredSize = false; updateCurrentVisiblePath(); tree.revalidate(); tree.repaint(); } | |
int beginPositionX = x - icon.getIconWidth() / 2; int beginPositionY = y - icon.getIconHeight() / 2; icon.paintIcon(c, g, beginPositionX, beginPositionY); | x -= icon.getIconWidth() / 2; y -= icon.getIconHeight() / 2; if (x < 0) x = 0; if (y < 0) y = 0; icon.paintIcon(c, g, x, y); | protected void drawCentered(Component c, Graphics g, Icon icon, int x, int y) { int beginPositionX = x - icon.getIconWidth() / 2; int beginPositionY = y - icon.getIconHeight() / 2; icon.paintIcon(c, g, beginPositionX, beginPositionY); } |
g.setColor(getHashColor()); | protected void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2) { for (int i = x1; i < x2; i += 2) g.drawLine(i, y, i + 1, y); } | |
g.setColor(getHashColor()); | protected void drawDashedVerticalLine(Graphics g, int x, int y1, int y2) { for (int i = y1; i < y2; i += 2) g.drawLine(x, i, x, i + 1); } | |
int size = 0; if (!treeModel.isLeaf(root)) size = treeModel.getChildCount(root); for (int i = 0; i < size; i++) | if (!treeModel.isLeaf(root) && !root.equals(node)) | private Object findNode(Object root, Object node) { int size = 0; if (!treeModel.isLeaf(root)) size = treeModel.getChildCount(root); for (int i = 0; i < size; i++) { if (treeModel.getIndexOfChild(root, node) != -1) return root; Object n = findNode(treeModel.getChild(root, i)... |
if (treeModel.getIndexOfChild(root, node) != -1) | int size = treeModel.getChildCount(root); for (int j = 0; j < size; j++) { Object child = treeModel.getChild(root, j); if (node.equals(child)) | private Object findNode(Object root, Object node) { int size = 0; if (!treeModel.isLeaf(root)) size = treeModel.getChildCount(root); for (int i = 0; i < size; i++) { if (treeModel.getIndexOfChild(root, node) != -1) return root; Object n = findNode(treeModel.getChild(root, i)... |
Object n = findNode(treeModel.getChild(root, i), node); | Object n = findNode(child, node); | private Object findNode(Object root, Object node) { int size = 0; if (!treeModel.isLeaf(root)) size = treeModel.getChildCount(root); for (int i = 0; i < size; i++) { if (treeModel.getIndexOfChild(root, node) != -1) return root; Object n = findNode(treeModel.getChild(root, i)... |
} | private Object findNode(Object root, Object node) { int size = 0; if (!treeModel.isLeaf(root)) size = treeModel.getChildCount(root); for (int i = 0; i < size; i++) { if (treeModel.getIndexOfChild(root, node) != -1) return root; Object n = findNode(treeModel.getChild(root, i)... | |
return UIManager.getLookAndFeelDefaults().getColor("Tree.hash"); | return UIManager.getColor("Tree.hash"); | protected Color getHashColor() { return UIManager.getLookAndFeelDefaults().getColor("Tree.hash"); } |
current = getParent(treeModel.getRoot(), current); | current = getParent(root, current); | int getLevel(Object node) { int count = -1; Object current = node; do { current = getParent(treeModel.getRoot(), current); count++; } while (current != null); return count; } |
} | int getLevel(Object node) { int count = -1; Object current = node; do { current = getParent(treeModel.getRoot(), current); count++; } while (current != null); return count; } | |
if (root == null || node == null) | if (root == null || node == null || root.equals(node)) | Object getParent(Object root, Object node) { if (root == null || node == null) return null; if (node instanceof TreeNode) return ((TreeNode) node).getParent(); return findNode(root, node); } |
Object cell = path.getLastPathComponent(); if (treeModel != null) { Object root = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, treeModel, cell, root); return getCellBounds(loc.x, loc.y, cell); } | row = getRowForPath(tree, path); cell = path.getLastPathComponent(); bounds = new Rectangle(0, row * getRowHeight(), 0, 0); | public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); if (treeModel != null) { Object root = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) ro... |
return null; | return nodeDimensions.getNodeDimensions(cell, row, getLevel(cell), tree.isExpanded(path), bounds); | public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); if (treeModel != null) { Object root = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) ro... |
updateCurrentVisiblePath(); | Object getPreviousVisibleNode(Object node) { updateCurrentVisiblePath(); if (currentVisiblePath != null) { Object[] nodes = currentVisiblePath.getPath(); int i = 0; while (i < nodes.length && !node.equals(nodes[i])) i++; // return the next node if (i-1 >= 0)... | |
updateCurrentVisiblePath(); | public int getRowCount(JTree tree) { updateCurrentVisiblePath(); if (currentVisiblePath != null) return currentVisiblePath.getPathCount(); return 0; } | |
tree.setRowHeight(UIManager.getInt("Tree.rowHeight")); | tree.setRowHeight(getRowHeight()); | protected void installDefaults() { LookAndFeel.installColorsAndFont(tree, "Tree.background", "Tree.foreground", "Tree.font"); tree.setOpaque(true); rightChildIndent = UIManager.getInt("Tree.rightChildIndent"); leftChildIndent = UIManager.getInt("Tree.leftChildIndent");... |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap) defaults.get("Tree.focusInputMap"); | InputMap focusInputMap = (InputMap) UIManager.get("Tree.focusInputMap"); | protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap) defaults.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMap(); action = new TreeAction... |
ActionMap parentActionMap = new ActionMap(); | ActionMap parentActionMap = new ActionMapUIResource(); | protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap) defaults.get("Tree.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); ActionMap parentActionMap = new ActionMap(); action = new TreeAction... |
bounds = getPathBounds(tree, path); | Rectangle bounds = getPathBounds(tree, path); | protected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY) { boolean cntlClick = false; int row = getRowForPath(tree, path); if (!isLeaf(row)) { bounds = getPathBounds(tree, path); if (hasControlIcons() && (mouseX ... |
if (currentVisiblePath != null && treeModel != null) | Rectangle clip = g.getClipBounds(); Insets insets = tree.getInsets(); if (clip != null && treeModel != null && currentVisiblePath != null) | public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; if (currentVisiblePath == null) updateCurrentVisiblePath(); if (currentVisiblePath != null && treeModel != null) { Object root = treeModel.getRoot(); paintRecursive(g, 0, 0, 0, tree, treeModel, root); if (ha... |
Object root = treeModel.getRoot(); paintRecursive(g, 0, 0, 0, tree, treeModel, root); | int startIndex = tree.getClosestRowForLocation(clip.x, clip.y); int endIndex = tree.getClosestRowForLocation(clip.x + clip.width, clip.y + clip.height); | public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; if (currentVisiblePath == null) updateCurrentVisiblePath(); if (currentVisiblePath != null && treeModel != null) { Object root = treeModel.getRoot(); paintRecursive(g, 0, 0, 0, tree, treeModel, root); if (ha... |
if (hasControlIcons()) paintControlIcons(g, 0, 0, 0, tree, treeModel, root); | paintVerticalPartOfLeg(g, clip, insets, currentVisiblePath); for (int i = startIndex; i <= endIndex; i++) { Object curr = currentVisiblePath.getPathComponent(i); boolean isLeaf = treeModel.isLeaf(curr); TreePath path = new TreePath(getPathToRoot(curr, 0)); boolean isExpanded = tree.isExpanded(path); Rectangle bounds =... | public void paint(Graphics g, JComponent c) { JTree tree = (JTree) c; if (currentVisiblePath == null) updateCurrentVisiblePath(); if (currentVisiblePath != null && treeModel != null) { Object root = treeModel.getRoot(); paintRecursive(g, 0, 0, 0, tree, treeModel, root); if (ha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.