rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (whitespace == IdentValue.NORMAL || whitespace == IdentValue.NOWRAP || whitespace == IdentValue.PRE) { | if (whitespace == IdentValue.NORMAL || whitespace == IdentValue.NOWRAP) { | static String collapseWhitespace(IdentValue whitespace, String text, boolean collapseLeading) { // do step 1 if (whitespace == IdentValue.NORMAL || whitespace == IdentValue.NOWRAP || whitespace == IdentValue.PRE) { text = linefeed_space_collapse.matcher(text).replaceAll(EOL); } ... |
text = tab_to_space.matcher(text).replaceAll(SPACE); text = space_collapse.matcher(text).replaceAll(SPACE); | static String collapseWhitespace(IdentValue whitespace, String text, boolean collapseLeading) { // do step 1 if (whitespace == IdentValue.NORMAL || whitespace == IdentValue.NOWRAP || whitespace == IdentValue.PRE) { text = linefeed_space_collapse.matcher(text).replaceAll(EOL); } ... | |
Border border = c.getCurrentStyle().getBorderWidth(c.getCtx()); | BorderPropertySet border = c.getCurrentStyle().getBorder(c.getCtx()); | private static InlineBox calculateInline(Context c, Content content, int avail, int max_width, InlineBox prev_align, boolean isFirstLetter, CascadedStyle firstLetterStyle, LineBox curr_line, int start, InlineBlockBox pendingBloc... |
inline.rightPadding = (int)margin.right() + border.right + (int)padding.right(); inline.leftPadding = (int)margin.left() + border.left + (int)padding.left(); | inline.rightPadding = (int)margin.right() + (int)border.right() + (int)padding.right(); inline.leftPadding = (int)margin.left() + (int)border.left() + (int)padding.left(); | private static InlineBox calculateInline(Context c, Content content, int avail, int max_width, InlineBox prev_align, boolean isFirstLetter, CascadedStyle firstLetterStyle, LineBox curr_line, int start, InlineBlockBox pendingBloc... |
Border border = style.getBorderWidth(c.getCtx()); | BorderPropertySet border = style.getBorder(c.getCtx()); | public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);... |
pendingLeftPadding += margin.left() + border.left + (int)padding.left(); pendingRightPadding += (int)padding.right() + border.right + margin.right(); | pendingLeftPadding += margin.left() + (int)border.left() + (int)padding.left(); pendingRightPadding += (int)padding.right() + (int)border.right() + margin.right(); | public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);... |
int rp = (int)padding.right() + border.right + (int)margin.right(); | int rp = (int)padding.right() + (int)border.right() + (int)margin.right(); | public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);... |
localServer.start("all"); | localServer.start("all", true); | public void setUp() throws Exception { super.setUp(); //Start the local server localServer = new LocalTestServer(); //Start all the services locally localServer.start("all"); localServer.deployQueue("Queue", null, false); //Connect to the remote... |
public Class getCategory() | public final Class getCategory() | public Class getCategory() { return PDLOverrideSupported.class; } |
public String getName() | public final String getName() | public String getName() { return "pdl-override-supported"; } |
ServerConnectionEndpoint(ServerPeer serverPeer, String clientID, String username, String password) | ServerConnectionEndpoint(ServerPeer serverPeer, String clientID, String username, String password, String clientConnectionId) | ServerConnectionEndpoint(ServerPeer serverPeer, String clientID, String username, String password) { this.serverPeer = serverPeer; sessions = new ConcurrentReaderHashMap(); temporaryDestinations = Collections.synchronizedSet(new HashSet()); //TODO Can probably improve concurrency for thi... |
this.clientConnectionId = clientConnectionId; | ServerConnectionEndpoint(ServerPeer serverPeer, String clientID, String username, String password) { this.serverPeer = serverPeer; sessions = new ConcurrentReaderHashMap(); temporaryDestinations = Collections.synchronizedSet(new HashSet()); //TODO Can probably improve concurrency for thi... | |
this.serverPeer.unregisterConnection(clientConnectionId); | public void close() throws JMSException { try { closeLock.writeLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (log.isTraceEnabled()) { log.trace("close()"); } if (closed) { log.warn("Connec... | |
String defaultStyleSheetLocation = Configuration.valueFor("xr.css.user-agent-default-css"); if (this.getClass().getResourceAsStream(defaultStyleSheetLocation) != null) { stream = this.getClass().getResource(defaultStyleSheetLocation).openStream(); | String defaultStyleSheet = Configuration.valueFor("xr.css.user-agent-default-css") + "XhtmlNamespaceHandler.css"; if (this.getClass().getResourceAsStream(defaultStyleSheet) != null) { stream = this.getClass().getResource(defaultStyleSheet).openStream(); | public InputStream getDefaultStylesheet() { InputStream stream = null; try { //TODO: weakness: if no configuration found, it bombs out. Should we be so reliable on correct config? Maybe a warning will do? String defaultStyleSheetLocation = Configuration.valueFor("xr.css.user-agen... |
XRLog.exception("Can't load default CSS from " + defaultStyleSheetLocation + "." + | XRLog.exception("Can't load default CSS from " + defaultStyleSheet + "." + | public InputStream getDefaultStylesheet() { InputStream stream = null; try { //TODO: weakness: if no configuration found, it bombs out. Should we be so reliable on correct config? Maybe a warning will do? String defaultStyleSheetLocation = Configuration.valueFor("xr.css.user-agen... |
if (log.isTraceEnabled()) { log.trace("Caught RuntimeException:" + e); } | log.error("Caught RuntimeException", e); | public Object invoke(Invocation invocation) throws Throwable { try { return invocation.invokeNext(); } catch(NotYetImplementedException e) { // TODO get rid of this throw e; } catch(WrapperException e) { if (log.isTraceEnabled()) { log.trace("... |
return distributedID + ":" + peerID + ":" + address; | return distributedID + ":" + Util.guidToString((String)peerID) + ":" + address; | public static String identityToString(Serializable distributedID, Serializable peerID, Address address) { return distributedID + ":" + peerID + ":" + address; } |
return request.execute(); | return request.execute(store); | public Object invoke(InvocationRequest invocation) throws Throwable { log.trace("Received request"); ServerRequest request = (ServerRequest)invocation.getParameter(); return request.execute(); } |
JobResult execute(); | Object execute(JobStore store) throws Exception; | JobResult execute(); |
throws BadLocationException | public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) { return 0; } | |
throws BadLocationException | public Rectangle modelToView(JTextComponent t, int pos) { return modelToView(t, pos, null); } | |
if (log.isTraceEnabled()) { log.trace("Enabling transacted messages"); } | protected void enableTransactedMessages(String txID) throws SystemException { super.enableTransactedMessages(txID); pm.enableTransactedMessages(channelID, txID); } | |
System.out.println("Code: " + method.getCompiledCode()); | System.out.println("Code: " + method.getDefaultCompiledCode()); | public static void main(String[] args) throws ClassNotFoundException { final String className = args[ 0]; final String mname = (args.length > 1) ? args[ 1] : null; ClassLoader cl = Thread.currentThread().getContextClassLoader(); final VmType cls = cl.loadClass(className).getVmClass(); ... |
CellView view = (graph.getGraphLayoutCache().getMapping(cell, false)); | CellView view = graph.getGraphLayoutCache().getMapping(cell, false); | public void actionPerformed(ActionEvent e) { Object cell = graph.getFirstCellForLocation(location.x, location.y); if(cell == null) { return; } else { CellView view = (graph.getGraphLayoutCache().getMapping(cell, false)); if(view instanceof CustomEdgeView) ... |
((CustomEdgeView)view).update(); | view.update(); | public void actionPerformed(ActionEvent e) { Object cell = graph.getFirstCellForLocation(location.x, location.y); if(cell == null) { return; } else { CellView view = (graph.getGraphLayoutCache().getMapping(cell, false)); if(view instanceof CustomEdgeView) ... |
ConnectionFactory cf = | cf = | public void setUp() throws Exception { super.setUp(); ServerManagement.startInVMServer(); initialContext = new InitialContext(InVMInitialContextFactory.getJNDIEnvironment()); ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/messaging/ConnectionFactory"); connect... |
connection = cf.createConnection(); | ServerManagement.deployTopic("Topic"); topic = (Destination)initialContext.lookup("/messaging/topics/Topic"); | public void setUp() throws Exception { super.setUp(); ServerManagement.startInVMServer(); initialContext = new InitialContext(InVMInitialContextFactory.getJNDIEnvironment()); ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/messaging/ConnectionFactory"); connect... |
connection = null; | public void tearDown() throws Exception { ServerManagement.stopInVMServer(); //connection.stop(); connection = null; super.tearDown(); } | |
Connection connection = cf.createConnection(); | public void testGetClientID() throws Exception { String clientID = connection.getClientID(); Set clientIDs = ServerManagement.getConnections(); assertEquals(1, clientIDs.size()); assertEquals(clientID, clientIDs.iterator().next()); } | |
Connection connection = cf.createConnection(); | public void testSetClientID() throws Exception { try { connection.setClientID("something"); fail("This should have failed"); } catch(IllegalStateException e) { // OK } } | |
ms2 = new PagingMessageStore("s30"); | ms2 = new SimpleMessageStore("s30"); | public void setUp() throws Exception { super.setUp(); //FIXME - Why are we starting more than one persistence manager using the same datasource?? //They will pointing at the same set of db tables thus giving indeterministic results tl2 = new JDBCPersistenceManager(sc.getDataSource(), sc.g... |
ms3 = new PagingMessageStore("s31"); | ms3 = new SimpleMessageStore("s31"); | public void setUp() throws Exception { super.setUp(); //FIXME - Why are we starting more than one persistence manager using the same datasource?? //They will pointing at the same set of db tables thus giving indeterministic results tl2 = new JDBCPersistenceManager(sc.getDataSource(), sc.g... |
NodeList list = root.getElementsByTagName("workflow"); | List list = XMLUtil.getChildElements(root, "workflow"); | public void initDone() throws FactoryException { reload = getProperties().getProperty("reload", "false").equals("true"); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream is = null; String name = getProperties().getProperty("resource", "workflows.xml")... |
for (int i = 0; i < list.getLength(); i++) { Element e = (Element) list.item(i); | for (int i = 0; i < list.size(); i++) { Element e = (Element) list.get(i); | public void initDone() throws FactoryException { reload = getProperties().getProperty("reload", "false").equals("true"); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream is = null; String name = getProperties().getProperty("resource", "workflows.xml")... |
ns = new _NamingContextStub(delegate); | ns = new _NamingContextStub(); ((_NamingContextStub) ns)._set_delegate(delegate); | private org.omg.CORBA.Object resolve(org.omg.CORBA.Object object) { NamingContext ns; String key = "?"; try { if (object instanceof NamingContext) ns = (NamingContext) object; else { Delegate delegate = ((ObjectImpl) object)._get_delegate(); ns = ne... |
info.setInlineBox(currentIB); | private static InlineBox addNestedInlineBoxes(LayoutContext c, LineBox line, List elementStack, int cbWidth) { InlineBox currentIB = null; InlineBox previousIB = null; boolean first = true; for (Iterator i = elementStack.iterator(); i.hasNext();) { InlineBoxInfo in... | |
if (currentLine.isFirstLine() && hasFirstLinePCs) { lbContext.setMaster(TextUtil.transformText( text.getText(), c.getCurrentStyle())); } | public static void layoutContent(LayoutContext c, Box box, List contentList) { int maxAvailableWidth = c.getExtents().width; int remainingWidth = maxAvailableWidth; int minimumLineHeight = (int) c.getCurrentStyle().getLineHeight(c); LineBox currentLine = newLine(c, null, box); Lin... | |
log.info("Sent" + numMessages); | public void run() { try { while (count < numMessages) { Message m = sess.createMessage(); m.setStringProperty("PROD_NAME", prodName); m.setIntProperty("MSG_NUMBER", count); prod.send(m); count++; } log.info("Sent" + nu... | |
super(); | super("The width, " + w + ", is illegal."); | public IllegalFormatWidthException(int w) { super(); this.w = w; } |
log.info("executor " + executorURL + " on-line and reset"); | log.info("executor " + executorURL + " on-line"); | private void checkExecutors(Coordinator coordinator, List executorURLs) throws Exception { for(Iterator i = executorURLs.iterator(); i.hasNext(); ) { String executorURL = (String)i.next(); try { log.debug("resetting " + executorURL); coordinator.sendToExecuto... |
log.info(""); | private Coordinator prepare(Execution e) throws Exception { String providerName = e.getProviderName(); List executorURLs = new ArrayList(); for(Iterator i = jobs.iterator(); i.hasNext(); ) { Object o = i.next(); if (o instanceof Job) { prepare((Job)o, provider... | |
public abstract BigInteger getG(); | BigInteger getG(); | public abstract BigInteger getG(); |
public abstract BigInteger getP(); | BigInteger getP(); | public abstract BigInteger getP(); |
public abstract BigInteger getQ(); | BigInteger getQ(); | public abstract BigInteger getQ(); |
ResolverTestHelper.assertOrganisationEntries(resolver, new String[] {"org1", "org2", "org6"}, orgs); | ResolverTestHelper.assertOrganisationEntries(resolver, new String[] {"org1", "org2", "org6", "org9"}, orgs); | public void testListing() throws Exception { FileSystemResolver resolver = new FileSystemResolver(); resolver.setName("test"); resolver.setIvy(_ivy); assertEquals("test", resolver.getName()); resolver.addIvyPattern(IVY_PATTERN); resolver.addArtifactPattern("test/rep... |
String fingerprint = null; if (elementStyling == null) { StringBuffer sb = new StringBuffer(); for (java.util.Iterator i = getMatchedRulesets(matchedSelectors); i.hasNext();) { sb.append(i.next().hashCode()); sb.append(":"); | java.util.List propList = new java.util.LinkedList(); for (java.util.Iterator i = getMatchedRulesets(matchedSelectors); i.hasNext();) { org.xhtmlrenderer.css.sheet.Ruleset rs = (org.xhtmlrenderer.css.sheet.Ruleset) i.next(); for (java.util.Iterator j = rs.getPropertyDeclarations(); j.hasNext();) { propList.add((org.xht... | CascadedStyle createCascadedStyle(org.w3c.dom.Element e, List matchedSelectors) { CascadedStyle cs = null; org.xhtmlrenderer.css.sheet.Ruleset elementStyling = getElementStyle(e); String fingerprint = null; if (elementStyling == null) {//try to re-use a CascadedStyle StringBuf... |
fingerprint = sb.toString(); if (_csCache == null) { _csCache = new java.util.HashMap(); | } if (elementStyling != null) { for (java.util.Iterator j = elementStyling.getPropertyDeclarations(); j.hasNext();) { propList.add((org.xhtmlrenderer.css.sheet.PropertyDeclaration) j.next()); | CascadedStyle createCascadedStyle(org.w3c.dom.Element e, List matchedSelectors) { CascadedStyle cs = null; org.xhtmlrenderer.css.sheet.Ruleset elementStyling = getElementStyle(e); String fingerprint = null; if (elementStyling == null) {//try to re-use a CascadedStyle StringBuf... |
cs = (CascadedStyle) _csCache.get(fingerprint); | CascadedStyle createCascadedStyle(org.w3c.dom.Element e, List matchedSelectors) { CascadedStyle cs = null; org.xhtmlrenderer.css.sheet.Ruleset elementStyling = getElementStyle(e); String fingerprint = null; if (elementStyling == null) {//try to re-use a CascadedStyle StringBuf... | |
if (cs == null) { java.util.List propList = new java.util.LinkedList(); for (java.util.Iterator i = getMatchedRulesets(matchedSelectors); i.hasNext();) { org.xhtmlrenderer.css.sheet.Ruleset rs = (org.xhtmlrenderer.css.sheet.Ruleset) i.next(); for (java.util.Iterator j = rs.getPropertyDeclarations(); j.hasNext();) { pro... | if (propList.size() == 0) cs = CascadedStyle.emptyCascadedStyle; else { cs = new CascadedStyle(propList.iterator()); String fingerprint = cs.getFingerprint(); CascadedStyle internal = (CascadedStyle) _csCache.get(fingerprint); if (internal != null) { cs = internal; } else { | CascadedStyle createCascadedStyle(org.w3c.dom.Element e, List matchedSelectors) { CascadedStyle cs = null; org.xhtmlrenderer.css.sheet.Ruleset elementStyling = getElementStyle(e); String fingerprint = null; if (elementStyling == null) {//try to re-use a CascadedStyle StringBuf... |
String fingerprint = null; StringBuffer sb = new StringBuffer(); | CascadedStyle cs = null; java.util.List propList = new java.util.LinkedList(); | private void resolvePseudoElements(org.w3c.dom.Element e, HashMap pseudoSelectors) { java.util.Iterator si = pseudoSelectors.entrySet().iterator(); if (!si.hasNext()) { return; } java.util.Map pelm = new java.util.HashMap(); while (si.hasNext()) { java.util.M... |
sb.append(i.next().hashCode()); sb.append(":"); | org.xhtmlrenderer.css.sheet.Ruleset rs = (org.xhtmlrenderer.css.sheet.Ruleset) i.next(); for (java.util.Iterator j = rs.getPropertyDeclarations(); j.hasNext();) { propList.add((org.xhtmlrenderer.css.sheet.PropertyDeclaration) j.next()); } | private void resolvePseudoElements(org.w3c.dom.Element e, HashMap pseudoSelectors) { java.util.Iterator si = pseudoSelectors.entrySet().iterator(); if (!si.hasNext()) { return; } java.util.Map pelm = new java.util.HashMap(); while (si.hasNext()) { java.util.M... |
fingerprint = sb.toString(); if (_csCache == null) { _csCache = new java.util.HashMap(); } CascadedStyle cs = (CascadedStyle) _csCache.get(fingerprint); if (cs == null) { java.util.List propList = new java.util.LinkedList(); for (java.util.Iterator i = getSelectedRulesets((java.util.List) me.getValue()); i.hasNext();)... | if (propList.size() == 0) cs = CascadedStyle.emptyCascadedStyle; else { cs = new CascadedStyle(propList.iterator()); String fingerprint = cs.getFingerprint(); CascadedStyle internal = (CascadedStyle) _csCache.get(fingerprint); if (internal != null) { cs = internal; } else { _csCache.put(fingerprint, cs); | private void resolvePseudoElements(org.w3c.dom.Element e, HashMap pseudoSelectors) { java.util.Iterator si = pseudoSelectors.entrySet().iterator(); if (!si.hasNext()) { return; } java.util.Map pelm = new java.util.HashMap(); while (si.hasNext()) { java.util.M... |
if (propList.size() == 0) cs = CascadedStyle.emptyCascadedStyle; else cs = new CascadedStyle(propList.iterator()); _csCache.put(fingerprint, cs); | private void resolvePseudoElements(org.w3c.dom.Element e, HashMap pseudoSelectors) { java.util.Iterator si = pseudoSelectors.entrySet().iterator(); if (!si.hasNext()) { return; } java.util.Map pelm = new java.util.HashMap(); while (si.hasNext()) { java.util.M... | |
key.append(sel.getSelectorID()).append(":"); | Mapper mapChild(Object e) { //Mapper childMapper = new Mapper(); java.util.List childAxes = new ArrayList(); java.util.HashMap pseudoSelectors = new java.util.HashMap(); java.util.List mappedSelectors = new java.util.LinkedList(); StringBuffer key = new Str... | |
Border margin = c.getCurrentStyle().getMarginWidth((float) oe.getWidth(), (float) oe.getWidth(), c.getCtx()); | Border margin = tableBox.getMarginWidth(c, (float) oe.getWidth()); | public static Box layout(Context c, Content content) { Box outerBox;//the outer box may be block or inline block boolean set_bfc = false; if (content instanceof TableContent) { outerBox = new BlockBox(); // install a block formatting context for the body, // ie.... |
Boxing.layoutChildren(c, block, content.getChildContent(c)); | Boxing.layoutChildren(c, block, content); | public static CellBox layoutCell(Context c, CellBox block, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ... |
c.getCanvas().add(block.component); | if (c.isInteractive()) { c.getCanvas().add(block.component); } | public static CellBox layoutCell(Context c, CellBox block, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ... |
log.debug("Option "+n+" : " + (int)((value[0] << 8) | value[1])); | log.debug("Option "+n+" : " + ((value[0] << 8) | value[1])); | protected boolean processResponse(Device device, NetDeviceAPI api, int transactionID, DatagramPacket packet) throws IOException { DHCPMessage msg = new DHCPMessage(packet); BOOTPHeader hdr = msg.getHeader(); if (hdr.getOpcode() != BOOTPHeader.BOOTREPLY) { // Not a response return false; } if (hdr.getTransacti... |
c.getGraphics().translate( line.x, line.y + ( line.baseline - inline.height ) ); | c.translate( line.x, line.y + ( line.baseline - inline.height ) ); | private static void paintInline( Context c, InlineBox inline, int lx, int ly, LineBox line ) { if ( InlineLayout.isReplaced( inline.node ) ) { //u.p("painting a replaced block: " + inline); c.getGraphics().translate( line.x, line.y + ( line.baseline - inline.height ) ); Rende... |
c.getGraphics().translate( -line.x, -( line.y + ( line.baseline - inline.height ) ) ); | c.translate( -line.x, -( line.y + ( line.baseline - inline.height ) ) ); | private static void paintInline( Context c, InlineBox inline, int lx, int ly, LineBox line ) { if ( InlineLayout.isReplaced( inline.node ) ) { //u.p("painting a replaced block: " + inline); c.getGraphics().translate( line.x, line.y + ( line.baseline - inline.height ) ); Rende... |
c.getGraphics().translate( xoff, yoff ); | c.translate( xoff, yoff ); | private static void paintInline( Context c, InlineBox inline, int lx, int ly, LineBox line ) { if ( InlineLayout.isReplaced( inline.node ) ) { //u.p("painting a replaced block: " + inline); c.getGraphics().translate( line.x, line.y + ( line.baseline - inline.height ) ); Rende... |
c.getGraphics().translate( -xoff, -yoff ); | c.translate( -xoff, -yoff ); | private static void paintInline( Context c, InlineBox inline, int lx, int ly, LineBox line ) { if ( InlineLayout.isReplaced( inline.node ) ) { //u.p("painting a replaced block: " + inline); c.getGraphics().translate( line.x, line.y + ( line.baseline - inline.height ) ); Rende... |
g.translate( inline.left, inline.top ); | c.translate( inline.left, inline.top ); | private static void paintInline( Context c, InlineBox inline, int lx, int ly, LineBox line ) { if ( InlineLayout.isReplaced( inline.node ) ) { //u.p("painting a replaced block: " + inline); c.getGraphics().translate( line.x, line.y + ( line.baseline - inline.height ) ); Rende... |
g.translate( -inline.left, -inline.top ); | c.translate( -inline.left, -inline.top ); | private static void paintInline( Context c, InlineBox inline, int lx, int ly, LineBox line ) { if ( InlineLayout.isReplaced( inline.node ) ) { //u.p("painting a replaced block: " + inline); c.getGraphics().translate( line.x, line.y + ( line.baseline - inline.height ) ); Rende... |
completeEntry(null, id, currentSteps); | completeEntry(null, id, currentSteps, newState); | public void changeEntryState(long id, int newState) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() == newState) { return; } if (canModifyEntryState(id, newState)) { if ((newSt... |
completeEntry(action, id, currentSteps); | completeEntry(action, id, currentSteps, WorkflowEntry.COMPLETED); | protected void checkImplicitFinish(ActionDescriptor action, long id) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName()); Collection currentSteps = st... |
protected void completeEntry(ActionDescriptor action, long id, Collection currentSteps) throws StoreException { getPersistence().setEntryState(id, WorkflowEntry.COMPLETED); | protected void completeEntry(ActionDescriptor action, long id, Collection currentSteps, int state) throws StoreException { getPersistence().setEntryState(id, state); | protected void completeEntry(ActionDescriptor action, long id, Collection currentSteps) throws StoreException { getPersistence().setEntryState(id, WorkflowEntry.COMPLETED); Iterator i = new ArrayList(currentSteps).iterator(); while (i.hasNext()) { Step step = (Step) i.next(); ... |
completeEntry(action, entry.getId(), getCurrentSteps(entry.getId())); | completeEntry(action, entry.getId(), getCurrentSteps(entry.getId()), WorkflowEntry.COMPLETED); | protected boolean transitionWorkflow(WorkflowEntry entry, List currentSteps, WorkflowStore store, WorkflowDescriptor wf, ActionDescriptor action, Map transientVars, Map inputs, PropertySet ps) throws WorkflowException { Map cache = (Map) stateCache.get(); if (cache != null) { cache.clear();... |
if (component != null) component.updateComponentInputMap(this); | public void put(KeyStroke keystroke, Object value) { super.put(keystroke, value); // FIXME: Notify component. } | |
if (component != null) component.updateComponentInputMap(this); | public void remove(KeyStroke keystroke) { super.remove(keystroke); // FIXME: Notify component. } | |
if (! (parentMap instanceof ComponentInputMap)) throw new IllegalArgumentException(); if (((ComponentInputMap) parentMap).getComponent() != component) throw new IllegalArgumentException(); | if (parentMap != null && !(parentMap instanceof ComponentInputMap)) throw new IllegalArgumentException("ComponentInputMaps can only have " + "ComponentInputMaps for parents"); if (parentMap != null && ((ComponentInputMap) parentMap).getComponent() != component) throw new IllegalArgumentException("ComponentInputMaps' p... | public void setParent(InputMap parentMap) { if (! (parentMap instanceof ComponentInputMap)) throw new IllegalArgumentException(); if (((ComponentInputMap) parentMap).getComponent() != component) throw new IllegalArgumentException(); super.setParent(parentMap); // FIXME: Notify component. } |
if (component != null) component.updateComponentInputMap(this); | public void setParent(InputMap parentMap) { if (! (parentMap instanceof ComponentInputMap)) throw new IllegalArgumentException(); if (((ComponentInputMap) parentMap).getComponent() != component) throw new IllegalArgumentException(); super.setParent(parentMap); // FIXME: Notify component. } | |
offscreenBuffers = new WeakHashMap(); repaintUnderway = false; commitRequests = new HashMap(); | public RepaintManager() { dirtyComponents = new HashMap(); invalidComponents = new ArrayList(); repaintWorker = new RepaintWorker(); doubleBufferMaximumSize = new Dimension(2000,2000); doubleBufferingEnabled = true; } | |
Rectangle r = new Rectangle(x, y, w, h); | if (! rectCache.isEmpty()) { | public void addDirtyRegion(JComponent component, int x, int y, int w, int h) { if (w <= 0 || h <= 0 || !component.isShowing()) return; Rectangle r = new Rectangle(x, y, w, h); if (dirtyComponents.containsKey(component)) r = r.union((Rectangle) dirtyComponen... |
r = r.union((Rectangle) dirtyComponents.get(component)); | { SwingUtilities.computeUnion(rectCache.x, rectCache.y, rectCache.width, rectCache.height, (Rectangle) dirtyComponents.get(component)); } else { | public void addDirtyRegion(JComponent component, int x, int y, int w, int h) { if (w <= 0 || h <= 0 || !component.isShowing()) return; Rectangle r = new Rectangle(x, y, w, h); if (dirtyComponents.containsKey(component)) r = r.union((Rectangle) dirtyComponen... |
dirtyComponents.put(component, r); | dirtyComponents.put(component, rectCache.getBounds()); } | public void addDirtyRegion(JComponent component, int x, int y, int w, int h) { if (w <= 0 || h <= 0 || !component.isShowing()) return; Rectangle r = new Rectangle(x, y, w, h); if (dirtyComponents.containsKey(component)) r = r.union((Rectangle) dirtyComponen... |
} | public void addDirtyRegion(JComponent component, int x, int y, int w, int h) { if (w <= 0 || h <= 0 || !component.isShowing()) return; Rectangle r = new Rectangle(x, y, w, h); if (dirtyComponents.containsKey(component)) r = r.union((Rectangle) dirtyComponen... | |
Component ancestor = component.getParent(); | Component ancestor = component; | public void addInvalidComponent(JComponent component) { Component ancestor = component.getParent(); while (ancestor != null && (! (ancestor instanceof JComponent) || ! ((JComponent) ancestor).isValidateRoot() )) ancestor = ancestor.getParent(); if (ancestor != null && anc... |
if (doubleBuffer == null || (((doubleBuffer.getWidth(null) < proposedWidth) || (doubleBuffer.getHeight(null) < proposedHeight)) && (proposedWidth < doubleBufferMaximumSize.width) && (proposedHeight < doubleBufferMaximumSize.height))) | Component root = SwingUtilities.getRoot(component); Image buffer = (Image) offscreenBuffers.get(root); if (buffer == null || buffer.getWidth(null) < proposedWidth || buffer.getHeight(null) < proposedHeight) | public Image getOffscreenBuffer(Component component, int proposedWidth, int proposedHeight) { if (doubleBuffer == null || (((doubleBuffer.getWidth(null) < proposedWidth) || (doubleBuffer.getHeight(null) < proposedHeight)) && (proposedWidth < doubleB... |
doubleBuffer = component.createImage(proposedWidth, proposedHeight); | int width = Math.max(proposedWidth, root.getWidth()); width = Math.min(doubleBufferMaximumSize.width, width); int height = Math.max(proposedHeight, root.getHeight()); height = Math.min(doubleBufferMaximumSize.height, height); buffer = component.createImage(width, height); offscreenBuffers.put(root, buffer); | public Image getOffscreenBuffer(Component component, int proposedWidth, int proposedHeight) { if (doubleBuffer == null || (((doubleBuffer.getWidth(null) < proposedWidth) || (doubleBuffer.getHeight(null) < proposedHeight)) && (proposedWidth < doubleB... |
return doubleBuffer; | return buffer; | public Image getOffscreenBuffer(Component component, int proposedWidth, int proposedHeight) { if (doubleBuffer == null || (((doubleBuffer.getWidth(null) < proposedWidth) || (doubleBuffer.getHeight(null) < proposedHeight)) && (proposedWidth < doubleB... |
repaintUnderway = false; commitRemainingBuffers(); | public void paintDirtyRegions() { // Short cicuit if there is nothing to paint. if (dirtyComponents.size() == 0) return; synchronized (dirtyComponents) { // We sort the components by their size here. This way we have a good // chance that painting the bigger components also paint... | |
WorkflowPort port = new WorkflowPort(); | DefaultPort port = new WorkflowPort(); | public static StepCell createStep(WorkflowDescriptor workflow, WorkflowGraphModel model, Point location) { // create new step String name = JOptionPane.showInputDialog(ResourceManager.getString("step.add.name")); if (name == null || name.trim().length() == 0) return null; StepDescriptor step = Descr... |
super.setLayout(new FlowLayout()); | public JComponent() { super(); super.setLayout(new FlowLayout()); setDropTarget(new DropTarget()); defaultLocale = Locale.getDefault(); debugGraphicsOptions = DebugGraphics.NONE_OPTION; setRequestFocusEnabled(true); } | |
System.out.println("update UI not overwritten in class: " + this); | public void updateUI() { System.out.println("update UI not overwritten in class: " + this); } | |
return attributes.getResolveParent(); | if (attributes.getResolveParent() != null) return attributes.getResolveParent(); return element_parent.getAttributes(); | public AttributeSet getResolveParent() { return attributes.getResolveParent(); } |
if (getElementCount() == 0) return - 1; | if (offset < getStartOffset()) return 0; | public int getElementIndex(int offset) { // If we have no children, return -1. if (getElementCount() == 0) return - 1; // XXX: There is surely a better algorithm // as beginning from first element each time. for (int index = 0; index < children.length; ++index) { E... |
for (int index = 0; index < children.length; ++index) | for (int index = 0; index < children.length - 1; ++index) | public int getElementIndex(int offset) { // If we have no children, return -1. if (getElementCount() == 0) return - 1; // XXX: There is surely a better algorithm // as beginning from first element each time. for (int index = 0; index < children.length; ++index) { E... |
if (children[index + 1].getStartOffset() > offset) { if ((offset - elem.getEndOffset()) > (children[index + 1].getStartOffset() - offset)) return index + 1; else return index; } | public int getElementIndex(int offset) { // If we have no children, return -1. if (getElementCount() == 0) return - 1; // XXX: There is surely a better algorithm // as beginning from first element each time. for (int index = 0; index < children.length; ++index) { E... | |
drainDestination(cf, queue); | public void setUp() throws Exception { super.setUp(); ServerManagement.init("all"); initialContext = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); ServerManagement.undeployTopic("Topic"); ServerManagemen... | |
u.p("do paint begin"); | public void doPaint( Graphics g ) { u.p("do paint begin"); if ( body_box == null ) { calcLayout( g ); } if ( doc == null ) { return; } newContext( g ); layout_thread.startRender(g); u.p("do paint end"); } | |
u.p("do paint end"); | public void doPaint( Graphics g ) { u.p("do paint begin"); if ( body_box == null ) { calcLayout( g ); } if ( doc == null ) { return; } newContext( g ); layout_thread.startRender(g); u.p("do paint end"); } | |
u.p("new context begin"); | private void newContext( Graphics g ) { u.p("new context begin"); Point origin = new Point( 0, 0 ); Point last = new Point( 0, 0 ); c.canvas = this; c.graphics = g; // set up the dimensions of the html canvas //Rectangle dimensions = new Rectangle(this.getWidth(),thi... | |
u.p("new context end"); | private void newContext( Graphics g ) { u.p("new context begin"); Point origin = new Point( 0, 0 ); Point last = new Point( 0, 0 ); c.canvas = this; c.graphics = g; // set up the dimensions of the html canvas //Rectangle dimensions = new Rectangle(this.getWidth(),thi... | |
u.p("paint ending"); | public void paintComponent( Graphics g ) { //g.setColor(Color.blue); //g.drawLine(0,0,50,50); u.p("paint() size = " + this.getSize()); //u.p("viewport size = " + this.viewport.getSize()); //u.p("w/o scroll = " + this.viewport.getViewportBorderBounds()); if ( anti_aliased ) ... | |
u.p("starting the real layout"); u.p("thread = " + Thread.currentThread()); | protected void startLayout(Graphics g) { //u.p("calcLayout()"); this.removeAll(); //u.p("this = "); //u.dump_stack(); if ( g == null ) { //u.p("bad first graphics"); return; } //u.p("layout"); //u.p("size = " + this.getSize()); //u... | |
u.p("ending count = " + (end_time-start_time) + " msec"); | protected void startLayout(Graphics g) { //u.p("calcLayout()"); this.removeAll(); //u.p("this = "); //u.dump_stack(); if ( g == null ) { //u.p("bad first graphics"); return; } //u.p("layout"); //u.p("size = " + this.getSize()); //u... | |
u.p("layout thread starting"); | public void run() { u.p("layout thread starting"); //u.p("graphics = " + graphics); try { Thread.currentThread().sleep(3000); } catch (Exception ex) { } panel.startLayout(graphics); this.completeLayout(); } | |
try { Thread.currentThread().sleep(3000); } catch (Exception ex) { } | public void run() { u.p("layout thread starting"); //u.p("graphics = " + graphics); try { Thread.currentThread().sleep(3000); } catch (Exception ex) { } panel.startLayout(graphics); this.completeLayout(); } | |
u.p("layout already in progress. skipping layout"); | public synchronized void startLayout(Graphics g) { if(isLayoutDone()) { //u.p("really starting new thread"); done = false; graphics = g; new Thread(this).start(); } else { u.p("layout already in progress. skipping layout"); } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.