buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void removeAll(String source) { List list = (List)super.remove(source); }
public void removeAll(String source) { super.remove(source); }
public void widgetSelected(SelectionEvent e) { shell.close(); } }); editItem.setMenu(menu); shell.pack(); shell.setSize(400, 500); shell.open(); while(!shell.isDisposed()) if (!display.readAndDispatch()) display.sleep(); } });
public void widgetSelected(SelectionEvent e) { shell.close(); } }); editItem.setMenu(menu); shell.pack(); shell.setSize(500, 600); shell.open(); while(!shell.isDisposed()) if (!display.readAndDispatch()) display.sleep(); } });
public CharSequence getCacheKey(MarkupContainer container, Class containerClass) { return null; } }
public String getCacheKey(MarkupContainer container, Class containerClass) { return null; } }
private void startServer(int port) { try { new RemoteJMeterEngineImpl(port); } catch (Exception ex) { log.error("Giving up, as server failed with:", ex); System.err.println("Server failed to start: "+ex); System.exit(1);// Give up } }
private void startServer(int port) { try { RemoteJMeterEngineImpl.startServer(port); } catch (Exception ex) { log.error("Giving up, as server failed with:", ex); System.err.println("Server failed to start: "+ex); System.exit(1);// Give up } ...
public void execute() throws BuildException { if ("javadoc2".equals(getTaskType())) { log("!! javadoc2 is deprecated. Use javadoc instead. !!"); }
public void execute() throws BuildException { if ("javadoc2".equals(getTaskType())) { log("Warning: the task name <javadoc2> is deprecated. Use <javadoc> instead.", Project.MSG_WARN); }
public JDBCConfigurationImpl(boolean derivations, boolean loadDefaults) { super(false, false); String[] aliases; schema = addString("jdbc.Schema"); schemas = addStringList("jdbc.Schemas"); transactionIsolation = addInt("jdbc.TransactionIsolation"); aliases = new Str...
public JDBCConfigurationImpl(boolean derivations, boolean loadDefaults) { super(false, false); String[] aliases; schema = addString("jdbc.Schema"); schemas = addStringList("jdbc.Schemas"); transactionIsolation = addInt("jdbc.TransactionIsolation"); aliases = new Str...
protected IRequestTarget resolveListenerInterfaceTarget(final RequestCycle requestCycle, final Page page, final String componentPath, final String interfaceName, final RequestParameters requestParameters) { if (interfaceName.equals(IRedirectListener.INTERFACE.getName())) { return new RedirectPageRequestT...
protected IRequestTarget resolveListenerInterfaceTarget(final RequestCycle requestCycle, final Page page, final String componentPath, final String interfaceName, final RequestParameters requestParameters) { if (interfaceName.equals(IRedirectListener.INTERFACE.getName())) { return new RedirectPageRequestT...
public void testSubResults() throws Exception { // This test tries to emulate a http sample, with two // subsamples, representing images that are downloaded for the // page representing the first sample. // Sample that will get two sub results, simulates a web pa...
public void testSubResults() throws Exception { // This test tries to emulate a http sample, with two // subsamples, representing images that are downloaded for the // page representing the first sample. // Sample that will get two sub results, simulates a web pa...
public Widget (Widget parent, int style) { checkSubclass (); checkParent (parent); this.style = style; display = parent.display; } int actionProc (int theControl, int partCode) { return OS.noErr; }
public Widget (Widget parent, int style) { checkSubclass (); checkParent (parent); this.style = style; display = parent.display; } int actionProc (int theControl, int partCode) { return OS.eventNotHandledErr; }
public int getVersion() { return 0; } };
public int getVersion() { return -1; } };
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addEx...
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addEx...
protected void intersectRanges(Token token) { RangeToken tok = (RangeToken)token; if (tok.ranges == null || this.ranges == null) return; this.icaseCache = null; this.sortRanges(); this.compactRanges(); tok.sortRanges(); tok.compactRanges(); ...
protected void intersectRanges(Token token) { RangeToken tok = (RangeToken)token; if (tok.ranges == null || this.ranges == null) return; this.icaseCache = null; this.sortRanges(); this.compactRanges(); tok.sortRanges(); tok.compactRanges(); ...
protected final void runExecute(Execute exe) throws IOException { int returnCode = -1; // assume the worst returnCode = exe.execute(); //test for and handle a forced process death if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); ...
protected final void runExecute(Execute exe) throws IOException { int returnCode = -1; // assume the worst returnCode = exe.execute(); //test for and handle a forced process death if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); ...
public Class getHomePage() { return HomePage.class; } }
public Class<HomePage> getHomePage() { return HomePage.class; } }
public void setVisible (boolean visible) { checkWidget(); if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* * In order to ensure that the shell is visible * and fully painted, dispatch events such as * GDK_MAP and GDK_CONFIGUR...
public void setVisible (boolean visible) { checkWidget(); if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* * In order to ensure that the shell is visible * and fully painted, dispatch events such as * GDK_MAP and GDK_CONFIGUR...
public void setVisible (boolean visible) { checkWidget(); realizeWidget (); /* Show the shell */ if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* Map the widget */ OS.XtSetMappedWhenManaged (shellHandle, true); if (OS.XtIsTopLevelShell (shellHandle)) { OS.XtMapWidget (shellHandle); ...
public void setVisible (boolean visible) { checkWidget(); realizeWidget (); /* Show the shell */ if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* Map the widget */ OS.XtSetMappedWhenManaged (shellHandle, true); if (OS.XtIsTopLevelShell (shellHandle)) { OS.XtMapWidget (shellHandle); ...
public void threadFinished(JMeterThread thread) { log.info("Ending thread " + thread.getThreadName()); allThreads.remove(thread); }
public void threadFinished(JMeterThread thread) { log.debug("Ending thread " + thread.getThreadName()); allThreads.remove(thread); }
public String[] mapFileName(String name) { if (name == null || !name.endsWith(".class") || name.endsWith(getStubClassSuffix() + ".class") || name.endsWith(getSkelClassSuffix() + ".class") || name.endsWith(getTieClassSuffix() + ".class")...
public String[] mapFileName(String name) { if (name == null || !name.endsWith(".class") || name.endsWith(getStubClassSuffix() + ".class") || name.endsWith(getSkelClassSuffix() + ".class") || name.endsWith(getTieClassSuffix() + ".class")...
public void testBrowseURLs() throws Exception { for (int i = 0; i < testURLs.length; i++) { testBrowse(testURLs[i]); Thread.sleep(1000); } }
public void testBrowseURLs() throws Exception { for (int i = 0; i < testURLs.length; i++) { testBrowse(testURLs[i]); Thread.sleep(3000); } }
protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel) { return DateTextField.forShortStyle(id, dateFieldModel); }
protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel) { return DateTextField.forShortStyle(id, dateFieldModel, false); }
public final void onSubmit() { if (signIn(getUsername(), getPassword())) { // If login has been called because the user was not yet // logged in, than continue to the original destination, // otherwise to the Home page if (!getPage().continueToOriginalDestination()) { setResponsePage(...
public final void onSubmit() { if (signIn(getUsername(), getPassword())) { // If login has been called because the user was not yet // logged in, than continue to the original destination, // otherwise to the Home page if (!continueToOriginalDestination()) { setResponsePage(getApplica...
public TreeItem[] getSelection () { checkWidget(); int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.GTK_VERSION < OS.VERSION (2, 2, 0)) { display.treeSelectionLength = 0; display.treeSelection = new int [items.length]; OS.gtk_tree_selection_selected_foreach (selection, display.treeSele...
public TreeItem[] getSelection () { checkWidget(); int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); if (OS.GTK_VERSION < OS.VERSION (2, 2, 0)) { display.treeSelectionLength = 0; display.treeSelection = new int [items.length]; OS.gtk_tree_selection_selected_foreach (selection, display.treeSele...
public void buildFinished(BuildEvent event) { long totalTime = System.currentTimeMillis() - buildElement.startTime; buildElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime)); if (event.getException() != null) { buildElement.element.setAttribute(ERROR_ATTR...
public void buildFinished(BuildEvent event) { long totalTime = System.currentTimeMillis() - buildElement.startTime; buildElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime)); if (event.getException() != null) { buildElement.element.setAttribute(ERROR_ATTR...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
public Sampler next2() { if (isFirst()) // must be the start of the subtree { calls = 0; noFailingSamples = 0; res = new SampleResult(); res.setSampleLabel(getName()); // Assume success res.setSuccessful(true); res.sampleStart(); } Sampler returnV...
public Sampler next2() { if (isFirst()) // must be the start of the subtree { calls = 0; noFailingSamples = 0; res = new SampleResult(); res.setSampleLabel(getName()); // Assume success res.setSuccessful(true); res.sampleStart(); } Sampler returnV...
public void addSample(SampleResult sample) { URL surl = null; if (sample instanceof HTTPSampleResult) { surl = ((HTTPSampleResult) sample).getURL(); // String rescontent = new String(sample.getResponseData()); if (sample.isResponseCodeOK() && ((HTTPSampleResult) sample).isMonitor()) { ObjectF...
public void addSample(SampleResult sample) { URL surl = null; if (sample instanceof HTTPSampleResult) { surl = ((HTTPSampleResult) sample).getURL(); // String rescontent = new String(sample.getResponseData()); if (sample.isResponseCodeOK() && ((HTTPSampleResult) sample).isMonitor()) { ObjectF...
public String toString() { StringBuffer buf = new StringBuffer("RemoteCallImpl["); buf.append("class=").append(clazz).append(";"); buf.append("method=").append(method) .append(";"); buf.append("params=").append(Arrays.asList(parameters)).append(";"); buf.append("timeout=").append(timeout).append("]"); ...
public String toString() { StringBuffer buf = new StringBuffer("RemoteCallImpl["); buf.append("class=").append(clazz).append(";"); buf.append("method=").append(method) .append(";"); buf.append("params=").append(parameters == null ? "" : Arrays.asList(parameters)).append(";"); buf.append("timeout=").appen...
protected void handleCreateMessage(ContainerMessage mess) throws IOException { final ContainerMessage.CreateMessage create = (ContainerMessage.CreateMessage) mess.getData(); if (create == null) throw new IOException(Messages.SOContainer_Exception_Bad_Container_Message); final ReplicaSharedObjectDescription de...
protected void handleCreateMessage(ContainerMessage mess) throws IOException { final ContainerMessage.CreateMessage create = (ContainerMessage.CreateMessage) mess.getData(); if (create == null) throw new IOException(Messages.SOContainer_Exception_Bad_Container_Message); final ReplicaSharedObjectDescription de...
public void respond(RequestCycle requestCycle) { Url currentUrl = requestCycle.getRequest().getUrl(); Url targetUrl = requestCycle.mapUrlFor(getRenderPageRequestHandler()); // // the code below is little hairy but we have to handle 3 redirect policies // and 3 rendering strategies // // try to get an ...
public void respond(RequestCycle requestCycle) { Url currentUrl = requestCycle.getRequest().getUrl(); Url targetUrl = requestCycle.mapUrlFor(getRenderPageRequestHandler()); // // the code below is little hairy but we have to handle 3 redirect policies // and 3 rendering strategies // // try to get an ...
public ImagePopupLink(String name, IModel cdModel) { super(name, cdModel); // custom popup settings that uses our automatic resize script PopupSettings popupSettings = new PopupSettings(PopupSettings.RESIZABLE); popupSettings.setHeight(20); popupSettings.setWidth(20); setPopupSettings(popupSettings); ...
public ImagePopupLink(String name, IModel cdModel) { super(name, cdModel); // custom popup settings that uses our automatic resize script PopupSettings popupSettings = new PopupSettings(); popupSettings.setHeight(20); popupSettings.setWidth(20); setPopupSettings(popupSettings); }
public Connection getConnection(Properties props) throws SQLException { // if we're using managed transactions, or user specified a DBCP driver // or DBCP is not on the classpath, then use SimpleDriver if (conf == null || conf.isTransactionModeManaged() || conf.isConnectionFactoryModeManaged...
public Connection getConnection(Properties props) throws SQLException { // if we're using managed transactions, or user specified a DBCP driver // or DBCP is not on the classpath, then use SimpleDriver if (conf == null || conf.isTransactionModeManaged() || conf.isConnectionFactoryModeManaged...
public WidgetDataEvents addControls(final Composite parent, final Listener statusListener) { final Composite mainComposite = new Composite(parent, SWT.NONE); GridLayout gridLayout = new GridLayout(1, false); mainComposite.setLayout(gridLayout); GridData gridData = new GridData(SWT.F...
public WidgetDataEvents addControls(final Composite parent, final Listener statusListener) { final Composite mainComposite = new Composite(parent, SWT.NONE); GridLayout gridLayout = new GridLayout(1, false); mainComposite.setLayout(gridLayout); GridData gridData = new GridData(SWT.F...
public Object convertToObject(String value, Locale locale) { if (value == null) { return null; } Class<?> theType = type.get(); if ("".equals(value)) { if (theType.equals(String.class)) { return theType.cast(""); } return null; } try { Object converted = Obje...
public Object convertToObject(String value, Locale locale) { if (value == null) { return null; } Class<?> theType = type.get(); if ("".equals(value)) { if (theType.equals(String.class)) { return theType.cast(""); } return null; } try { Object converted = Obje...
public Class resolveClass(final String classname); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a...
public Class resolveClass(final String classname); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a...
private MostRecentlyUsedMap getPages() { if (this.pages == null) { this.pages = new MostRecentlyUsedMap(session.getApplication().getSettings() .getMaxPages()); } return this.pages; } }
private final MostRecentlyUsedMap getPages() { if (this.pages == null) { this.pages = new MostRecentlyUsedMap(session.getApplication().getSettings() .getMaxPages()); } return this.pages; } }
private static void setTimeout(Method method, URLConnection conn ,int timeout){ if (method == null){ log.warn("Connect/Read Timeout is not supported on this JVM"); return; } try { method.invoke(conn, new Integer[]{new Integer(timeout)}); } catch (I...
private static void setTimeout(Method method, URLConnection conn ,int timeout){ if (method == null){ log.warn("Connect/Read Timeout is not supported on this JVM"); return; } try { method.invoke(conn, new Object[]{new Integer(timeout)}); } catch (Il...
private final WebMarkupContainer getHeaderPart() { // gracefull getAssociateMarkupStream. Throws no exception in case // markup is not found final MarkupStream associatedMarkupStream = getApplication().getMarkupCache() .getMarkupStream(this, false); // No associated markup => no header section if (asso...
private final WebMarkupContainer getHeaderPart() { // gracefull getAssociateMarkupStream. Throws no exception in case // markup is not found final MarkupStream associatedMarkupStream = getApplication().getMarkupCache() .getMarkupStream(this, false); // No associated markup => no header section if (asso...
public void testToStringThrowable() { NullPointerException np = new NullPointerException("null test"); WicketRuntimeException wre = new WicketRuntimeException("null test", np); String exceptionString = Strings.toString(wre); assertTrue(exceptionString.length() > 1); assertTrue(exceptionString.contains("Wick...
public void testToStringThrowable() { NullPointerException np = new NullPointerException("null test"); WicketRuntimeException wre = new WicketRuntimeException("null test", np); String exceptionString = Strings.toString(wre); assertTrue(exceptionString.length() > 1); assertTrue(exceptionString.indexOf("Wicke...
package org.apache.tools.ant.taskdefs.optional.rjunit.remote; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the follow...
package org.apache.tools.ant.taskdefs.optional.rjunit.remote; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the follow...
private static final String[] MENU_ADD_CONTROLLER = new String[] { MenuFactory.CONTROLLERS, MenuFactory.SAMPLERS, MenuFactory.CONFIG_ELEMENTS, MenuFactory.TIMERS, MenuFactory.LISTENERS, MenuFactory.PRE_PROCESSORS, MenuFactory.POST_PROCESSORS };
private static final String[] MENU_ADD_CONTROLLER = new String[] { MenuFactory.CONTROLLERS, MenuFactory.SAMPLERS, MenuFactory.ASSERTIONS, MenuFactory.CONFIG_ELEMENTS, MenuFactory.TIMERS, MenuFactory.LISTENERS, MenuFactory.PRE_PROCESSORS, MenuFactory.POST_PROCESSORS };
public JPopupMenu createPopupMenu() { JPopupMenu pop = new JPopupMenu(); pop.add(MenuFactory.makeMenus(new String[] { MenuFactory.CONTROLLERS, MenuFactory.LISTENERS, MenuFactory.SAMPLERS, MenuFactory.TIMERS, MenuFactory.CONFIG_ELEMENTS, MenuFactory.PRE_PROCESSORS, MenuFactory.POST_PROCESSORS }, JMeterUtils...
public JPopupMenu createPopupMenu() { JPopupMenu pop = new JPopupMenu(); pop.add(MenuFactory.makeMenus(new String[] { MenuFactory.CONTROLLERS, MenuFactory.LISTENERS, MenuFactory.SAMPLERS, MenuFactory.ASSERTIONS,MenuFactory.TIMERS, MenuFactory.CONFIG_ELEMENTS, MenuFactory.PRE_PROCESSORS, MenuFactory.POST_PR...
protected void importFileset(FileSet fileset) { DirectoryScanner ds = fileset.getDirectoryScanner(this.project); if (ds.getIncludedFiles().length == 0) { return; } Vector classes = new Vector(); Vector sources = new Vector(); Vector resources = new Vector...
protected void importFileset(FileSet fileset) { DirectoryScanner ds = fileset.getDirectoryScanner(this.project); if (ds.getIncludedFiles().length == 0) { return; } Vector classes = new Vector(); Vector sources = new Vector(); Vector resources = new Vector...
private InetAddress selectBestAddress(InetAddress bestSoFar, InetAddress current) { InetAddress best = bestSoFar; if (best == null) { // none selected so far, so this one is better. best = current; } else { if (current == null || current.isLoop...
private InetAddress selectBestAddress(InetAddress bestSoFar, InetAddress current) { InetAddress best = bestSoFar; if (best == null) { // none selected so far, so this one is better. best = current; } else { if (current == null || current.isLoop...
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(AnnotationFactoryTest.class); suite.addTestSuite(AnnotationsTest.class); suite.addTestSuite(ParamValuePairImplTest.class); suite.addTestSuite(ComplexAnnotationImplTest.class); suite.addTestSuite(QualifiedNameValueImplTest....
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(AnnotationFactoryTest.class); suite.addTestSuite(AnnotationsTest.class); suite.addTestSuite(ParamValuePairImplTest.class); suite.addTestSuite(ComplexAnnotationImplTest.class); suite.addTestSuite(QualifiedNameValueImplTest....
public boolean setParent (Composite parent) { checkWidget (); if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (this.parent == parent) return true; if (!isReparentable ()) return false; releaseParent (); Shell newShell = parent.getShell (), o...
public boolean setParent (Composite parent) { checkWidget (); if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (this.parent == parent) return true; if (!isReparentable ()) return false; releaseParent (); Shell newShell = parent.getShell (), o...
protected boolean isAuthorized() { // check whether the user is logged on return (((LibrarySession)Session.get()).isSignedIn()); } }; getSecuritySettings().setAuthorizationStrategy(authorizationStrategy); }
protected boolean isAuthorized() { // check whether the user is logged on return LibrarySession.get().isSignedIn(); } }; getSecuritySettings().setAuthorizationStrategy(authorizationStrategy); }
public boolean signIn(final String username, final String password) { // Sign the user in final User user = ((LibrarySession)getSession()).authenticate(username, password); // If the user was signed in if (user != null) { return true; } else { error(getLocalizer().getStr...
public boolean signIn(final String username, final String password) { // Sign the user in final User user = LibrarySession.get().authenticate(username, password); // If the user was signed in if (user != null) { return true; } else { error(getLocalizer().getString("could...
public boolean supports(String feature, String version) { return getOwnerDocument().getImplementation().hasFeature(feature, version); }
public boolean supports(String feature, String version) { return ownerDocument().getImplementation().hasFeature(feature, version); }
public void updateModel() { Object object = getDefaultModelObject(); boolean supportsMultiple = object instanceof Collection; Object converted = getConvertedInput(); /* * update the model */ if (supportsMultiple) { Collection<?> modelCollection = (Collection<?>)object; modelChanging(); mod...
public void updateModel() { T object = getModelObject(); boolean supportsMultiple = object instanceof Collection; Object converted = getConvertedInput(); /* * update the model */ if (supportsMultiple) { Collection<?> modelCollection = (Collection<?>)object; modelChanging(); modelCollection...
private void checkContent( String content, ValidationContext state, boolean asBase ) throws InvalidDatatypeValueException { // validate against parent type if any if (fBaseValidator instanceof NOTATIONDatatypeValidator) { // validate content as a base type ((NOTATIONDatat...
private void checkContent( String content, ValidationContext state, boolean asBase ) throws InvalidDatatypeValueException { // validate against parent type if any if (fBaseValidator instanceof NOTATIONDatatypeValidator) { // validate content as a base type ((NOTATIONDatat...
public void testSetFirstResults() { EntityManager em = currentEntityManager(); List l = em.createQuery("Select object(o) from Entity1 o") .setFirstResult(3) .getResultList(); Entity1 ent = (Entity1) l.get(0); assertNotNull(ent); assertEquals("string...
public void testSetFirstResults() { EntityManager em = currentEntityManager(); List l = em.createQuery("Select object(o) from Entity1 o order by o.pk") .setFirstResult(3) .getResultList(); Entity1 ent = (Entity1) l.get(0); assertNotNull(ent); assert...
private static void doReportTempDir(PrintStream out) { String tempdir=System.getProperty("java.io.tmpdir"); if( tempdir == null ) { out.println("Warning: java.io.tmpdir is undefined"); return; } out.println("Temp dir is "+ tempdir); File tempDirectory=...
private static void doReportTempDir(PrintStream out) { String tempdir=System.getProperty("java.io.tmpdir"); if( tempdir == null ) { out.println("Warning: java.io.tmpdir is undefined"); return; } out.println("Temp dir is "+ tempdir); File tempDirectory=...
protected Object onGetObject(final Component component) { final String expression = ognlExpression(component); if (Strings.isEmpty(expression)) { // No expression will cause OGNL to throw an exception. The OGNL // expression to return the current object is "#this". Instead // of throwing that exception...
protected Object onGetObject(final Component component) { final String expression = ognlExpression(component); if (Strings.isEmpty(expression)) { // No expression will cause OGNL to throw an exception. The OGNL // expression to return the current object is "#this". Instead // of throwing that exception...
public void processRequestCycle() { WebRequestCycle cycle = new WebRequestCycle(wicketSession, wicketRequest, wicketResponse); cycle.request(); previousRenderedPage = lastRenderedPage; // handle redirects which are usually managed by the browser // transparently final MockHttpServletResponse httpRespons...
public void processRequestCycle() { WebRequestCycle cycle = new WebRequestCycle(wicketSession, wicketRequest, wicketResponse); cycle.request(); previousRenderedPage = lastRenderedPage; // handle redirects which are usually managed by the browser // transparently final MockHttpServletResponse httpRespons...
public void create (Composite parent, int style) { if (delegateClass == 0) { Class safariClass = this.getClass(); Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$ int /*long*/ proc3 = Callback3.getAddress(); if (proc3 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS); Callback4 = new Callba...
public void create (Composite parent, int style) { if (delegateClass == 0) { Class safariClass = this.getClass(); Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$ int /*long*/ proc3 = Callback3.getAddress(); if (proc3 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS); Callback4 = new Callba...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
private void implementMungers() { World world = getIWorld(); for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.implementOn(this); if (world.getModel() != null) { //System.err.println("munger: " + munger + " on " + this); AsmAdaptor...
private void implementMungers() { World world = getIWorld(); for (Iterator iter = mungers.iterator(); iter.hasNext();) { ShadowMunger munger = (ShadowMunger) iter.next(); munger.implementOn(this); if (world.getModel() != null) { //System.err.println("munger: " + munger + " on " + this); AsmAdapter...
public void setAlpha (int alpha) { if (window == null) return; checkWidget (); alpha &= 0xFF; window.setAlphaValue (alpha / 255f); } void setBounds (int x, int y, int width, int height, boolean move, boolean resize) { // Embedded Shells are not resizable. if (window == null) return; if (fullScreen) setFullScre...
public void setAlpha (int alpha) { if (window == null) return; checkWidget (); alpha &= 0xFF; window.setAlphaValue (alpha / 255f); } void setBounds (int x, int y, int width, int height, boolean move, boolean resize) { // Embedded Shells are not resizable. if (window == null) return; if (fullScreen) setFullScre...
public String getText () { checkWidget(); return text; } boolean isTabGroup () { return true; } boolean isTabItem () { return false; } Decorations menuShell () { return this; } void releaseChildren (boolean destroy) { if (menuBar != null) { menuBar.dispose (); menuBar = null; } Display display = this.d...
public String getText () { checkWidget(); return text; } boolean isTabGroup () { return true; } boolean isTabItem () { return false; } Decorations menuShell () { return this; } void releaseChildren (boolean destroy) { if (menuBar != null) { menuBar.dispose (); menuBar = null; } Display display = this.d...
private static final String ZXING_URL = "http://zxing.appspot.com/scan"; static final Vector<BarcodeFormat> PRODUCT_FORMATS; static final Vector<BarcodeFormat> ONE_D_FORMATS; static final Vector<BarcodeFormat> QR_CODE_FORMATS; static final Vector<BarcodeFormat> ALL_FORMATS; static { PRODUCT_FORMATS = ...
private static final String ZXING_URL = "http://zxing.appspot.com/scan"; static final Vector<BarcodeFormat> PRODUCT_FORMATS; static final Vector<BarcodeFormat> ONE_D_FORMATS; static final Vector<BarcodeFormat> QR_CODE_FORMATS; static final Vector<BarcodeFormat> ALL_FORMATS; static { PRODUCT_FORMATS = ...
public void setVisible (boolean visible) { checkWidget(); if (((state & HIDDEN) == 0) == visible) return; int /*long*/ topHandle = topHandle(); if (visible) { /* * It is possible (but unlikely), that application * code could have disposed the widget in the show * event. If this happens, just return. */ ...
public void setVisible (boolean visible) { checkWidget(); if (((state & HIDDEN) == 0) == visible) return; int /*long*/ topHandle = topHandle(); if (visible) { /* * It is possible (but unlikely), that application * code could have disposed the widget in the show * event. If this happens, just return. */ ...
public void setVisible (boolean visible) { checkWidget(); int topHandle = topHandle (); int [] argList = {OS.XmNmappedWhenManaged, 0}; OS.XtGetValues (topHandle, argList, argList.length / 2); if ((argList [1] != 0) == visible) return; Control control = null; boolean fixFocus = false; if (!visible) { if (displ...
public void setVisible (boolean visible) { checkWidget(); int topHandle = topHandle (); int [] argList = {OS.XmNmappedWhenManaged, 0}; OS.XtGetValues (topHandle, argList, argList.length / 2); if ((argList [1] != 0) == visible) return; Control control = null; boolean fixFocus = false; if (!visible) { if (displ...
public FileEditor() { // Create a button to trigger the file chooser: JButton button= new JButton("Browse..."); button.addActionListener(this); // Get a WrapperEditor to provide the field or combo: editor= new WrapperEditor( new SimpleFileEditor(), new ComboStringEditor(), true, true); //...
public FileEditor() { // Create a button to trigger the file chooser: JButton button= new JButton("Browse..."); button.addActionListener(this); // Get a WrapperEditor to provide the field or combo: editor= new WrapperEditor( new SimpleFileEditor(), new ComboStringEditor(), true, true, true);...
private void initRegex(String argName) { String quotedArg = Perl5Compiler.quotemeta(argName);// Don't get tripped up by RE chars in the arg name pathExtensionEqualsQuestionmarkRegexp = JMeterUtils.getPatternCache().getPattern( SEMI_COLON + quotedArg + "=([^\"'<>&\\s;]*)", // $NON-NLS...
private void initRegex(String argName) { String quotedArg = Perl5Compiler.quotemeta(argName);// Don't get tripped up by RE chars in the arg name pathExtensionEqualsQuestionmarkRegexp = JMeterUtils.getPatternCache().getPattern( SEMI_COLON + quotedArg + "=([^\"'<>&\\s;]*)", // $NON-NLS...
private ClassMetaData getCandidate() { RootImpl<?> root = (RootImpl<?>)getRoot(); RootImpl<?> correlatedRoot = (RootImpl<?>)root.getCorrelatedParent(); if (correlatedRoot != null && root.getJoins() != null) { Join<?,?> join = root.getJoins().iterator().next(); FieldMeta...
private ClassMetaData getCandidate() { RootImpl<?> root = (RootImpl<?>)getRoot(); PathImpl<?, ?> correlatedRoot = root.getCorrelatedParent(); if (correlatedRoot != null && root.getJoins() != null) { Join<?,?> join = root.getJoins().iterator().next(); FieldMetaData fmd =...
public SaveFieldManager getSaveFieldManager() { return _saved; } /** * Rollback the state of the instance to the saved state from the * last call to {@link #saveFields}, or to default values if never saved. */ void restoreFields() { lock(); try { if (_...
public SaveFieldManager getSaveFieldManager() { return _saved; } /** * Rollback the state of the instance to the saved state from the * last call to {@link #saveFields}, or to default values if never saved. */ void restoreFields() { lock(); try { if (_...
public Table (Composite parent, int style) { super (parent, checkStyle (style)); } TableItem _getItem (int index) { if ((style & SWT.VIRTUAL) != 0) return items [index]; if (items [index] != null) return items [index]; return items [index] = new TableItem (this, SWT.NONE, -1, false); }
public Table (Composite parent, int style) { super (parent, checkStyle (style)); } TableItem _getItem (int index) { if ((style & SWT.VIRTUAL) == 0) return items [index]; if (items [index] != null) return items [index]; return items [index] = new TableItem (this, SWT.NONE, -1, false); }
protected ISharedObject loadSharedObject(SharedObjectDescription sd) throws Exception { if (sd == null) throw new NullPointerException("SharedObjectDescription cannot be null"); // Then get args array from properties Object[] args = container.getArgsFromProperties(sd); // And arg types String[] types = co...
protected ISharedObject loadSharedObject(SharedObjectDescription sd) throws Exception { if (sd == null) throw new NullPointerException("SharedObjectDescription cannot be null"); // Then get args array from properties Object[] args = container.getArgsFromProperties(sd); // And arg types String[] types = co...
public void select (int index) { checkWidget(); if (index < 0 || index >= items.length) return; setText (items [index]); } void setBackgroundColor (GdkColor color) { super.setBackgroundColor (color); if (entryHandle != 0) OS.gtk_widget_modify_base (entryHandle, 0, color); if (listHandle != 0) OS.gtk_widget_modif...
public void select (int index) { checkWidget(); if (index < 0 || index >= items.length) return; setText (items [index]); } void setBackgroundColor (GdkColor color) { super.setBackgroundColor (color); if (entryHandle != 0) OS.gtk_widget_modify_base (entryHandle, 0, color); if (listHandle != 0) OS.gtk_widget_modif...
public Antidote(AppContext context) { setLayout(new BorderLayout()); _context = context; // Add the various editors/views to the editing area. JSplitPane splitter = new JSplitPane(); splitter.add(JSplitPane.LEFT, populateEditors("left")); splitter.add(JSplitPane.RIG...
public Antidote(AppContext context) { setLayout(new BorderLayout()); _context = context; // Add the various editors/views to the editing area. JSplitPane splitter = new JSplitPane(); splitter.add(JSplitPane.LEFT, populateEditors("left")); splitter.add(JSplitPane.RIG...
public SampleResult sample() { SampleResult result = new SampleResult(); result.setSuccessful(false); // Assume it will fail result.setResponseCode("000"); // ditto $NON-NLS-1$ result.setSampleLabel(getName()); try { result.setURL(this.getUrl()); org.w3c.dom.Element rdoc = createDocument(); if (rdoc...
public SampleResult sample() { SampleResult result = new SampleResult(); result.setSuccessful(false); // Assume it will fail result.setResponseCode("000"); // ditto $NON-NLS-1$ result.setSampleLabel(getName()); try { result.setURL(this.getUrl()); org.w3c.dom.Element rdoc = createDocument(); if (rdoc...
public final void processEvents(final RequestCycle requestCycle) { // Preprocess like standard component request. Do all the initialization // necessary onProcessEvents(requestCycle); // Get the IBehavior for the component based on the request parameters final Component component = getTarget(); final Str...
public final void processEvents(final RequestCycle requestCycle) { // Preprocess like standard component request. Do all the initialization // necessary onProcessEvents(requestCycle); // Get the IBehavior for the component based on the request parameters final Component component = getTarget(); final Str...
public DefaultComponentFactory( final URL[] urls ) { this( urls, null ); }
public DefaultComponentFactory( final URL[] urls ) { this( urls, Thread.currentThread().getContextClassLoader() ); }
public Component select( Object hint ) throws ComponentException { if( !(hint instanceof String) ) { throw new ComponentException( "Invalid hint, expected a string not a " + hint.getClass().getName() ); } final Strin...
public Component select( Object hint ) throws ComponentException { if( !(hint instanceof String) ) { throw new ComponentException( "Invalid hint, expected a string not a " + hint.getClass().getName() ); } final Strin...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { final String label = getLabel(); final String request = getScript(); final String fileName = getFilename(); log.debug(label + " " + fileName); SampleResult res = new SampleResult(); res.setSampleLabel(label); FileInputStre...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { final String label = getLabel(); final String request = getScript(); final String fileName = getFilename(); log.debug(label + " " + fileName); SampleResult res = new SampleResult(); res.setSampleLabel(label); FileInputStre...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); int trimX = x - marginWidth - highlight_margin - borderLeft; int trimWidth = width + borderLeft + borderRight + 2*marginWidth + 2*highlight_margin; if (minimized) { int trimY = onBottom ? y - borderTop : y - highlight_header - tab...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); int trimX = x - marginWidth - highlight_margin - borderLeft; int trimWidth = width + borderLeft + borderRight + 2*marginWidth + 2*highlight_margin; if (minimized) { int trimY = onBottom ? y - borderTop : y - highlight_header - tab...
public void testDefault() { tester.startPage(A.class, new PageParameters().set("file", "umlaut-\u00E4-\u00F6-\u00FC")); tester.assertRenderedPage(B.class); String url2 = ((B)tester.getLastRenderedPage()).getInterceptContinuationURL(); assertTrue(url2.contains("umlaut-%C3%A4-%C3%B6-%C3%BC")); tester.clickL...
public void testDefault() { tester.startPage(A.class, new PageParameters().set("file", "umlaut-\u00E4-\u00F6-\u00FC")); tester.assertRenderedPage(B.class); String url2 = ((B)tester.getLastRenderedPage()).getInterceptContinuationURL(); assertTrue(url2.contains("umlaut-%C3%A4-%C3%B6-%C3%BC")); tester.clickL...
public TextLayout (Device device) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; wrapWidth = ascent = descent = -1; lineSpacing = 0; orientation = SWT.LEFT_TO_RIGHT; styles = new StyleItem[2]; styles[0] = new StyleItem(); styles[...
public TextLayout (Device device) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; wrapWidth = ascent = descent = -1; lineSpacing = 0; orientation = SWT.LEFT_TO_RIGHT; styles = new StyleItem[2]; styles[0] = new StyleItem(); styles[...
public boolean isSelected (int index) { checkWidget (); if (!(0 <= index && index < itemsCount)) return false; return items [index].isSelected (); } void onArrowDown (int stateMask) { if ((stateMask & (SWT.SHIFT | SWT.CTRL)) == 0) { /* Down Arrow with no modifiers */ int newFocusIndex = focusItem.index + 1; i...
public boolean isSelected (int index) { checkWidget (); if (!(0 <= index && index < itemsCount)) return false; return items [index].isSelected (); } void onArrowDown (int stateMask) { if ((stateMask & (SWT.SHIFT | SWT.CTRL)) == 0) { /* Down Arrow with no modifiers */ int newFocusIndex = focusItem.index + 1; i...
private void tarjan(Item item) { visited.add(item); setLowLink(item, getIndex(item)); stack.add(0, item); for (CallGroup group : item.getSubroutines()) { Item sub = (Item)group.getSubroutine(); if (!hasBeenVisited(sub)) { tarjan(sub); setLowLinkIfSmaller(item, getLowLink(sub)); } else if(stack...
private void tarjan(Item item) { visited.add(item); setLowLink(item, getIndex(item)); stack.add(0, item); for (CallGroup group : item.getSubroutines()) { Item sub = group.getSubroutine(); if (!hasBeenVisited(sub)) { tarjan(sub); setLowLinkIfSmaller(item, getLowLink(sub)); } else if(stack.conta...
private String formatInfo(final List<String> messages) { buffer = new StringBuffer(); if (messages.size() > 1) { buffer.append(Messages.XtendXpandProblemHover_MultipleMarkers); final Iterator<String> e = messages.iterator(); while (e.hasNext()) { splitInfo("- " + e.next() + "\n"); } } else if (me...
private String formatInfo(final List<String> messages) { buffer = new StringBuffer(); if (messages.size() > 1) { buffer.append(Messages.XtendXpandProblemHover_MultipleMarkers); final Iterator<String> e = messages.iterator(); while (e.hasNext()) { splitInfo("- " + e.next() + "\n"); } } else if (me...
public IXtendXpandProject findProject(final IResource res) { if (res == null) return null; final IJavaProject ele = JavaCore.create(res.getProject()); try { if (ele != null && res.getProject().isAccessible() && res.getProject().isNatureEnabled(XtendXpandNature.NATURE_...
public IXtendXpandProject findProject(final IResource res) { if (res == null) return null; final IJavaProject ele = JavaCore.create(res.getProject()); try { if (ele != null && res.getProject().isAccessible() && res.getProject().isNatureEnabled(XtendXpandNature.NATURE_...
public boolean isAssignable(final IType toAssigTo, final IType assignable) { return ((ITypeHierarchy) cache.get(assignable)).contains(toAssigTo); }
public boolean isAssignable(final IType toAssigTo, final IType assignable) { return (cache.get(assignable)).contains(toAssigTo); }
public void registerParser(final String template_extension, final ResourceParser parser) { } }; }
public void registerParser(final String template_extension, final ResourceParser parser) { } } }
public OracleDictionary() { platform = "Oracle"; validationSQL = "SELECT SYSDATE FROM DUAL"; nextSequenceQuery = "SELECT {0}.NEXTVAL FROM DUAL"; stringLengthFunction = "LENGTH({0})"; joinSyntax = SYNTAX_DATABASE; maxTableNameLength = 30; maxColumnNameLength = ...
public OracleDictionary() { platform = "Oracle"; validationSQL = "SELECT SYSDATE FROM DUAL"; nextSequenceQuery = "SELECT {0}.NEXTVAL FROM DUAL"; stringLengthFunction = "LENGTH({0})"; joinSyntax = SYNTAX_DATABASE; maxTableNameLength = 30; maxColumnNameLength = ...
* public IModel model(Object object) * { * return new DetachableUserModel((User)object); * } * } * </pre> * * You can use the {@link IDetachable#detach()} method for cleaning up your IDataProvider instance. * So that you can do one query that returns both the size and the values if your dataset is small ...
* public IModel model(Object object) * { * return new DetachableUserModel((User)object); * } * } * </pre> * * You can use the {@link IDetachable#detach()} method for cleaning up your IDataProvider instance. * So that you can do one query that returns both the size and the values if your dataset is small ...
public void testErrorCodeConfigurationHasAllKnownDictionaries() { SQLErrorCodeReader reader = new SQLErrorCodeReader(); InputStream in = DBDictionary.class.getResourceAsStream ("sql-error-state-codes.xml"); assertNotNull(in); List<String> names = reader.getDictionaries(in); assertTrue(names.size()>=18); ...
public void assertException(Throwable t, Class expectedType) { if (!isExpectedException(t, expectedType)) { t.printStackTrace(); print(t, 0); fail(t + " or its cause is not instanceof " + expectedType); } } /** * Affirms if the given expected type of the exception is equal to or a * subclass of th...
private void registerPackage(final EPackage pack, ResourceSet rs, boolean overwrite) { Registry packageRegistry = rs.getPackageRegistry(); // finding duplicates by nsURI is better than by name since package // names may be used across MMs if (!overwrite && packageRegistry.containsKey(pack.getNsURI())) { if ...
private void registerPackage(final EPackage pack, ResourceSet rs, boolean overwrite) { Registry packageRegistry = rs.getPackageRegistry(); // finding duplicates by nsURI is better than by name since package // names may be used across MMs if (!overwrite && packages.containsKey(pack.getNsURI())) {//packageRegis...
public String toString() { return getProperty1(); }
public String toString() { return getProperty1() + ", " + getProperty2() + ", " + getProperty3(); }
protected XpandPluginExecutionContext(ResourceManager resourceManager, Resource currentResource, TypeSystemImpl typeSystem, Map<String, Variable> vars, Map<String, Variable> globalVars, Output output, ProtectedRegionResolver prs, ProgressMonitor monitor, IXtendXpandProject xp) { super(resourceManager, currentR...
protected XpandPluginExecutionContext(ResourceManager resourceManager, Resource currentResource, TypeSystemImpl typeSystem, Map<String, Variable> vars, Map<String, Variable> globalVars, Output output, ProtectedRegionResolver prs, ProgressMonitor monitor, IXtendXpandProject xp) { super(resourceManager, currentR...
protected PluginExecutionContextImpl(ResourceManager resourceManager, Resource currentResource, TypeSystemImpl typeSystem, Map<String, Variable> vars, Map<String, Variable> globalVars, IXtendXpandProject xp) { super(resourceManager, currentResource, typeSystem, vars, globalVars, null, null, null, null, null, n...
protected PluginExecutionContextImpl(ResourceManager resourceManager, Resource currentResource, TypeSystemImpl typeSystem, Map<String, Variable> vars, Map<String, Variable> globalVars, IXtendXpandProject xp) { super(resourceManager, currentResource, typeSystem, vars, globalVars, null, null, null, null, null, n...
protected ExecutionContextImpl getExecutionContext(final WorkflowContext ctx) { final ExecutionContextImpl executionContext = new ExecutionContextImpl(getResourceManager(), null, new TypeSystemImpl(), new HashMap<String, Variable>(), getGlobalVars(ctx), null, exceptionHandler, null, getNullEvaluationHandler...
protected ExecutionContextImpl getExecutionContext(final WorkflowContext ctx) { final ExecutionContextImpl executionContext = new ExecutionContextImpl(getResourceManager(), null, new TypeSystemImpl(), new HashMap<String, Variable>(), getGlobalVars(ctx), null, exceptionHandler, null, getNullEvaluationHandler...
protected void scanDir(File baseDir, String files[], FileNameMapper mapper) { SourceFileScanner sfs = new SourceFileScanner(this); String[] newFiles = sfs.restrict(files, baseDir, baseDir, mapper); for (int i = 0; i < newFiles.length; i++) { String clas...
protected void scanDir(File baseDir, String files[], FileNameMapper mapper) { SourceFileScanner sfs = new SourceFileScanner(this); String[] newFiles = sfs.restrict(files, baseDir, baseDir, mapper); for (int i = 0; i < newFiles.length; i++) { String clas...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); int border = getBorder (); Rect rect = new Rect (); OS.GetDataBrowserScrollBarInset (handle, rect); x -= rect.left + border; y -= rect.top + border; width += rect.left + rect.right + border + border; height += rect.top + rect.bo...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); int border = getBorder (); Rect rect = new Rect (); OS.GetDataBrowserScrollBarInset (handle, rect); x -= rect.left + border; y -= rect.top + border; width += rect.left + rect.right + border + border; height += rect.top + rect.bo...
public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.VIRTUAL); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setSorter(new ViewerSorter()); viewer.setInput(getViewSite(...
public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.VIRTUAL | SWT.FULL_SELECTION); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setSorter(new ViewerSorter()); viewer....
public synchronized void updateGui() { if (graph.getWidth() < 10){ graph.setPreferredSize(new Dimension(getWidth() - 40, getHeight() - 160)); } graphPanel.updateUI(); graph.updateGui(); }
public synchronized void updateGui() { if (graph.getWidth() < 10){ graph.setPreferredSize(new Dimension(getWidth() - 40, getHeight() - 160)); } graphPanel.updateUI(); graph.repaint(); }
import org.apache.wicket.request.mapper.parameters.PageParameters; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to Yo...
import org.apache.wicket.request.mapper.parameters.PageParameters; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to Yo...
import org.apache.wicket.request.mapper.parameters.PageParameters; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to Yo...
import org.apache.wicket.request.mapper.parameters.PageParameters; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to Yo...
import org.apache.wicket.request.mapper.parameters.PageParameters; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to Yo...
import org.apache.wicket.request.mapper.parameters.PageParameters; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to Yo...
package sprockets; package wapplet; import java.awt.Container; /** * The IApplet interface should be implemented by the class passed to the Applet * constructor. This class and every class referenced by it will be * automatically included in the applet JAR file for this applet. When the * applet is loaded by the...
package sprockets; package sprockets; import java.awt.Container; /** * The IApplet interface should be implemented by the class passed to the Applet * constructor. This class and every class referenced by it will be * automatically included in the applet JAR file for this applet. When the * applet is loaded by t...