Examples of Selection


Examples of com.sun.star.awt.Selection

    * Has <b> OK </b> status if selection set before is equal to a selection we
    * got using getSelection().
    */
    public void _setSelection() {
        oObj.setText("setSelection");
        Selection sel = new Selection(0,3);
        oObj.setSelection(sel);
        tRes.tested("setSelection()", ValueComparer.equalValue
            (oObj.getSelection(), sel));
    }
View Full Code Here

Examples of com.sun.star.awt.Selection

    * Has <b> OK </b> status if selection set before is equal to a selection we
    * got using getSelection().
    */
    public void _getSelection() {
        oObj.setText("getSelection");
        Selection sel = new Selection(2,3);
        oObj.setSelection(sel);
        tRes.tested("getSelection()", ValueComparer.equalValue
            (oObj.getSelection(), sel));
    }
View Full Code Here

Examples of com.sun.star.awt.Selection

     */
    private void focus(Object textControl) {
        ((XWindow)UnoRuntime.queryInterface(XWindow.class,textControl)).setFocus();
        XTextComponent xTextComponent = (XTextComponent)UnoRuntime.queryInterface(XTextComponent.class,textControl);
        String text = xTextComponent.getText();
        xTextComponent.setSelection( new Selection(0, text.length()) );
        XControl xc = (XControl)UnoRuntime.queryInterface(XControl.class,textControl);
        focusGained(xc);
    }
View Full Code Here

Examples of com.sun.star.awt.Selection

    synchronized void rowDown(int guiRow, Object control ) {
        // only perform if this is not the last row.
        int actuallRow = guiRow + nscrollvalue;
        if ( actuallRow + 1 < scrollfields.size() ) {
            // get the current selection
            Selection selection = getSelection(control );
           
            // the last row should scroll...
            boolean scroll = guiRow == ( nblockincrement - 1 );
            if (scroll)
                setScrollValue( nscrollvalue + 1 );
View Full Code Here

Examples of com.sun.star.awt.Selection

    synchronized void rowUp(int guiRow, Object control ) {
        // only perform if this is not the first row
        int actuallRow = guiRow + nscrollvalue;
        if ( actuallRow > 0 ) {
            // get the current selection
            Selection selection = getSelection( control );
           
            // the last row should scroll...
            boolean scroll = (guiRow == 0);
            if (scroll)
                setScrollValue( nscrollvalue - 1 );
View Full Code Here

Examples of com.volantis.mcs.policies.variants.selection.Selection

        // Iterate over all the variants populating selection specific data
        // structures.
        while (variants.hasNext()) {
            Variant variant = (Variant) variants.next();
            Selection selection = variant.getSelection();
            if (selection instanceof TargetedSelection) {
                TargetedSelection targetedSelection =
                        (TargetedSelection) selection;

                // Only generate categories if they are supported by this
View Full Code Here

Examples of de.filiadata.lucene.spider.generated.msoffice2000.word.Selection

   *
   * @param wordAppl The Word application to get the selected text from.
   * @return The currently selected text.
   */
  private String getSelection(Application wordAppl) {
    Selection sel = wordAppl.getSelection();
    // Alternative (VB): sel.moveEndWhile(?? cset:=vbCr ??, WdConstants.wdBackward);
    // Alternative (VB): Call app.ActiveDocument.Bookmarks.Item("\endofdoc").Select()
    sel.moveEnd();
    sel.copy();
    return sel.getText();
  }
View Full Code Here

Examples of edu.isi.karma.controller.command.selection.Selection

    Worksheet worksheet = workspace.getWorksheet(worksheetId);
    RepFactory factory = workspace.getFactory();
    SuperSelection superSel = this.getSuperSelection(worksheet);
    HTable hTable = factory.getHTable(factory.getHNode(hNodeId).getHTableId());
    if (type.equals("Column")) {
      Selection currentSel = superSel.getSelection(hTable.getId());
      if (currentSel != null) {
        outputColumns.addAll(currentSel.getInputColumns());
        oldSelections.put(currentSel.getHTableId(), currentSel);
        worksheet.getSelectionManager().removeSelection(currentSel);
        superSel.removeSelection(currentSel);
      }
    }
    if (type.equals("All")) {
View Full Code Here

Examples of edu.mit.simile.fresnel.results.Selection

   * @throws IOException
   */
  public void fresnelView(HttpServletRequest request, HttpServletResponse response) throws IOException  {
    PrintWriter writer = new PrintWriter(new OutputStreamWriter(response.getOutputStream() , "UTF-8"));
    String errorString = null;
    Selection selected = null;
    List<org.apache.commons.httpclient.URI> retrievedURLs = null;
    Resource focalResource = null;
    Configuration conf = null;
    String redirectLocation = null;
   
    try {
      /* Reload the Fresnel configuration using the provided language */
      String langPref = (request.getParameter("lang") != null ? request.getParameter("lang") : "en");
      loadFresnelConfig(langPref);

      conf = new Configuration(confRepository, ontoRepository);
     
      /* Create the focal resource */
      if (request.getParameter("uri") != null) {
        String uriString = request.getParameter("uri");
        if (uriString.startsWith("_:")) /* blank node */
          focalResource = valueFactory.createBNode(uriString.substring(2));
        else
          focalResource = valueFactory.createURI(uriString);
         
        /* Collect data about the focal resource */
        if (request.getParameter("skipload") == null) {
          retrievedURLs = semwebClient.discoverResource(focalResource, true /* wait */);   
        } /* skip */
       
        /* Initiate manual owl:sameAs inference */
        if (request.getParameter("skipInference") == null) {
          sameAsInferencer.addInferredForResource(focalResource);
        }
     
        if (conf.hasWarnings())
          writer.println(conf.getWarningsString());
       
        Purpose purpose = null;
       
        /* Look up the requested lens purpose */
        if (request.getParameter("purpose") != null && (!request.getParameter("purpose").equals("defaultPurpose")))
          purpose = new Purpose(new URIImpl(Constants.nsFresnelExt + request.getParameter("purpose")));
        else
          purpose = new Purpose(new URIImpl("http://www.w3.org/2004/09/fresnel#defaultLens")); /* this must be provided, or a random lens is chosen */

        try {
          /* Perform Fresnel selection using the requested display purpose and language */
          selected = conf.select(dataRepository, focalResource, purpose, langPref);
   
          /* Perform Fresnel formatting */
          selected = conf.format(dataRepository, selected);
        }
        catch (NoResultsException e) {
         
              /*
               * If no results are found, redirect the user to the resource
               * if it is not an RDF document.
               * This code is not reached when there already is some data about the resource.
               */
              RepositoryConnection metaDataConn = null;
            try {
              metaDataConn = metaDataRepository.getConnection();
             
            /* Manual support for one level of redirects */
              String resourceRedirect = cacheController.getCachedHeaderDataValue(metaDataConn, focalResource, "location");
              Resource resourceURI = (resourceRedirect == null ? focalResource : new URIImpl(resourceRedirect));
 
              /* Get target content type */
              String contentType = cacheController.getCachedHeaderDataValue(metaDataConn, resourceURI, "content-type");
            if (contentType != null && !ContentTypes.isRDF(contentType)) {
              redirectLocation = focalResource.toString();
            }
          } catch (RepositoryException re) {
            re.printStackTrace();
          } catch (IllegalArgumentException ie) {
            ie.printStackTrace();
          }
          finally {
            try {
              if (metaDataConn != null)
                metaDataConn.close();
              }
            catch (RepositoryException re) {
              re.printStackTrace();
            }
          }
        }
      } /* uri != null */
    } catch (Exception e) {
      e.printStackTrace();
      errorString = e.getMessage();
   
   
    /* Output */
    try {
      /* Handle redirection to non-RDF data */
      if (redirectLocation != null) {
        response.setHeader("Location", redirectLocation);
        response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
      }
      else { /* Perform XSL output */
       
        /*
         * When there are no results, we still need a selection object in
         * order to render the fresnel tree
         */
        if (selected == null)
          selected = new Selection(conf);
       
        Document fresnelTree = selected.render();
        addSources(fresnelTree, retrievedURLs);
       
        /* Prepare XSLT */
        StreamSource styleSource = new StreamSource(new File(dataRoot + "/" + xslDirectory + "/" + xslTransformation));
        net.sf.saxon.TransformerFactoryImpl tf = new net.sf.saxon.TransformerFactoryImpl();
View Full Code Here

Examples of fi.luomus.commons.containers.Selection

      assertEquals("VALUE", o.getValue());
      assertEquals("description", o.getText());
    }

    public void test___selections() {
      Selection s = new SelectionImple("PESA.puulaji");
      //assertEquals("pesa.puulaji", s.getName());
      try {
        s.get("a");
        fail("Should throw exception: does not contain value");
      } catch (IllegalArgumentException e) {
        assertEquals("Selection pesa.puulaji does not define value 'a'.", e.getMessage());
      }
    }
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.