Examples of Monitor


Examples of org.eclipse.swt.widgets.Monitor

   * @return the initial location of the shell
   */
  protected Point getInitialLocation(Point initialSize) {
    Composite parent = shell.getParent();

    Monitor monitor = shell.getDisplay().getPrimaryMonitor();
    if (parent != null) {
      monitor = parent.getMonitor();
    }

    Rectangle monitorBounds = monitor.getClientArea();
    Point centerPoint;
    if (parent != null) {
      centerPoint = Geometry.centerPoint(parent.getBounds());
    } else {
      centerPoint = Geometry.centerPoint(monitorBounds);
View Full Code Here

Examples of org.eclipse.swt.widgets.Monitor

   */
  private static Monitor getClosestMonitor(Display toSearch, Point toFind) {
    int closest = Integer.MAX_VALUE;

    Monitor[] monitors = toSearch.getMonitors();
    Monitor result = monitors[0];

    for (int idx = 0; idx < monitors.length; idx++) {
      Monitor current = monitors[idx];

      Rectangle clientArea = current.getClientArea();

      if (clientArea.contains(toFind)) {
        return current;
      }

View Full Code Here

Examples of org.eclipse.swt.widgets.Monitor

   */
  protected Rectangle getConstrainedShellBounds(Rectangle preferredSize) {
    Rectangle result = new Rectangle(preferredSize.x, preferredSize.y,
        preferredSize.width, preferredSize.height);

    Monitor mon = getClosestMonitor(getShell().getDisplay(), Geometry
        .centerPoint(result));

    Rectangle bounds = mon.getClientArea();

    if (result.height > bounds.height) {
      result.height = bounds.height;
    }

View Full Code Here

Examples of org.geoserver.monitor.Monitor

        });
       
        form.add(new AjaxButton("refresh") {
            @Override
            protected void onSubmit(AjaxRequestTarget target, Form form) {
                Monitor monitor =
                    ((GeoServerApplication)getApplication()).getBeanOfType(Monitor.class);
               
                Date[] range = new Date[]{ from, to };
               
                chartImage.setImageResource(queryAndRenderChart(monitor, range));
View Full Code Here

Examples of org.gradle.api.plugins.jetty.internal.Monitor

            server.start();

            logger.info("Started Jetty Server");

            if (getStopPort() != null && getStopPort() > 0 && getStopKey() != null) {
                Monitor monitor = new Monitor(getStopPort(), getStopKey(),
                        new Server[]{(Server) server.getProxiedObject()}, !daemon);
                monitor.start();
            }

            // start the scanner thread (if necessary) on the main webapp
            configureScanner();
            startScanner();
View Full Code Here

Examples of org.jnode.vm.scheduler.Monitor

     * @param heapManager
     */
    public FinalizerThread(DefaultHeapManager heapManager) {
        super("finalizer-thread");
        this.heapManager = heapManager;
        this.monitor = new Monitor();
        this.visitor = new FinalizerVisitor(heapManager.getHelper());
    }
View Full Code Here

Examples of org.joone.engine.Monitor

    // Configure the neural net for prediction
    neuralNet.getInputLayer().addInputSynapse(inputSynapse);
    neuralNet.getOutputLayer().addOutputSynapse(outputSynapse);
    inputSynapse.setAdvancedColumnSelector("1-" + attributes.length);

    Monitor monitor = neuralNet.getMonitor();
    monitor.setTrainingPatterns(1);
    monitor.setTotCicles(1);
    monitor.setLearning(false);
  }
View Full Code Here

Examples of org.seleniumhq.selenium.fluent.Monitor

public class CompositeMonitorTest {

    @Test
    public void onlyOneTimerIsStarted() {
        Monitor m1 = mock(Monitor.class);
        when(m1.start("foo")).thenReturn(new Monitor.Timer.NULL());
        Monitor m2 = mock(Monitor.class);
        Monitor.Timer t2 = mock(Monitor.Timer.class);
        when(m2.start("foo")).thenReturn(t2);
        Monitor m3 = mock(Monitor.class);
        when(m3.start("foo")).thenReturn(new Monitor.Timer.NULL());

        CompositeMonitor monitor = new CompositeMonitor(m1, m2, m3);
        Monitor.Timer chosenTimer = monitor.start("foo");

        assertThat(chosenTimer, equalTo(t2));
View Full Code Here

Examples of org.sonar.process.monitor.Monitor

      .startsWith(FilenameUtils.normalize(homeDir.getAbsolutePath(), true));
  }

  @Test
  public void do_not_watch_stop_file_by_default() throws Exception {
    Monitor monitor = mock(Monitor.class);
    App app = new App(monitor);
    app.start(initDefaultProps());

    assertThat(app.getStopWatcher()).isNull();
  }
View Full Code Here

Examples of org.wsI.testing.x2003.x03.log.Monitor

    log.setMessageEntryArray( new MessageEntry[] { requestMessage, responseMessage } );
  }

  private void addMonitorConfig( Log log ) throws Exception
  {
    Monitor monitor = log.addNewMonitor();

    monitor.setVersion( "1.5" );
    monitor.setReleaseDate( Calendar.getInstance() );

    org.wsI.testing.x2003.x03.monitorConfig.Configuration conf = monitor.addNewConfiguration();
    conf.setCleanupTimeoutSeconds( 0 );
    conf.setLogDuration( 0 );

    org.wsI.testing.x2003.x03.monitorConfig.LogFile logFileConf = conf.addNewLogFile();
    logFileConf.setLocation( "report.xml" );
    logFileConf.setReplace( true );

    /*
     * ArrayOfRedirectConfig mintConf = conf.addNewManInTheMiddle();
     * RedirectConfig redirect = mintConf.addNewRedirect();
     * redirect.setListenPort( 9999 ); redirect.setMaxConnections( 10 );
     * redirect.setReadTimeoutSeconds( 10 );
     *
     * URL endpoint = new URL( modelItem.getEndpoint()); if(
     * endpoint.getPort() > 0 ) redirect.setSchemeAndHostPort(
     * endpoint.getHost() + ":" + endpoint.getPort()); else
     * redirect.setSchemeAndHostPort( endpoint.getHost() );
     */

    Environment env = monitor.addNewEnvironment();
    NameVersionPair osConf = env.addNewOperatingSystem();
    osConf.setName( "Windows" );
    osConf.setVersion( "2003" );

    NameVersionPair rtConf = env.addNewRuntime();
    rtConf.setName( "java" );
    rtConf.setVersion( "1.5" );

    NameVersionPair xpConf = env.addNewXmlParser();
    xpConf.setName( "xmlbeans" );
    xpConf.setVersion( "2.1.0" );

    Implementation implConf = monitor.addNewImplementer();
    implConf.setName( "soapui" );
    implConf.setLocation( "here" );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.