Examples of Part


Examples of org.gephi.partition.api.Part

            }
            return false;
        }

        public boolean evaluate(Graph graph, Edge edge) {
            Part p = partition.getPart(edge);
            if (p != null) {
                int partCount = p.getObjects().length;
                return range.isInRange(partCount);
            }
            return false;
        }
View Full Code Here

Examples of org.gephi.partition.api.Part

        colorCol.setCellRenderer(new ColorChooserRenderer());
        colorCol.setPreferredWidth(16);
        colorCol.setMaxWidth(16);

        for (int j = 0; j < partsArray.length; j++) {
            final Part p = partsArray[partsArray.length - 1 - j];
            model.setValueAt(p.getValue(), j, 0);
            model.setValueAt(p.getDisplayName(), j, 1);
            String perc = "(" + formatter.format(p.getPercentage()) + ")";
            model.setValueAt(perc, j, 2);
        }
    }
View Full Code Here

Examples of org.gephi.partition.api.Part

        colorCol.setCellRenderer(new ColorChooserRenderer());
        colorCol.setPreferredWidth(16);
        colorCol.setMaxWidth(16);

        for (int j = 0; j < partsArray.length; j++) {
            final Part p = partsArray[partsArray.length - 1 - j];
            model.setValueAt(p.getValue(), j, 0);
            model.setValueAt(p.getDisplayName(), j, 1);
            String perc = "(" + formatter.format(p.getPercentage()) + ")";
            model.setValueAt(perc, j, 2);
        }
    }
View Full Code Here

Examples of org.gephi.partition.api.Part

        Set<Part> filterParts = new HashSet<Part>(currentParts);
        Part[] parts = partition.getParts();
        Arrays.sort(parts);
        for (int i = 0; i < parts.length; i++) {
            final Part p = parts[parts.length - 1 - i];
            PartWrapper pw = new PartWrapper(p, p.getColor());
            pw.setEnabled(filterParts.contains(p));
            model.add(i, pw);
        }
        list.setModel(model);
    }
View Full Code Here

Examples of org.glassfish.api.admin.Payload.Part

        final Map<File,Properties> result = new LinkedHashMap<File,Properties>();

        OutputStream os = null;

        boolean isReportProcessed = false;
        Part possibleUnrecognizedReportPart = null;

        StringBuilder uploadedEntryNames = new StringBuilder();
        for (Iterator<Payload.Part> partIt = inboundPayload.parts(); partIt.hasNext();) {
            Payload.Part part = partIt.next();
            DataRequestType drt = DataRequestType.getType(part);
            if (drt != null) {
                result.put(drt.processPart(this, part, part.getName()), part.getProperties());
                isReportProcessed |= (drt == DataRequestType.REPORT);
                uploadedEntryNames.append(part.getName()).append(" ");
            } else {
                if ( (! isReportProcessed) && possibleUnrecognizedReportPart == null) {
                    possibleUnrecognizedReportPart = part;
                }
            }
        }
        if ( (! isReportProcessed) && possibleUnrecognizedReportPart != null) {
            DataRequestType.REPORT.processPart(this, possibleUnrecognizedReportPart,
                    possibleUnrecognizedReportPart.getName());
            isReportProcessed = true;
        }
        postProcessParts();
        return result;
    }
View Full Code Here

Examples of org.hibernate.test.jpa.Part

      return;
    }
    String check = "Lock Modes";
    Session s1 = getSessions().openSession();
    Transaction t1 = s1.beginTransaction();
    Part part = new Part( new Item( "EJB3 Specification" ), check, "3.3.5.3", new BigDecimal( 0.0 ) );
    s1.save( part );
    t1.commit();
    s1.close();

    Long partId = part.getId();

    // Now, open a new Session and re-load the part...
    s1 = getSessions().openSession();
    t1 = s1.beginTransaction();
    part = ( Part ) s1.get( Part.class, partId );

    // now that the item is associated with the persistence-context of that session,
    // open a new session and modify it "behind the back" of the first session
    Session s2 = getSessions().openSession();
    Transaction t2 = s2.beginTransaction();
    Part part2 = ( Part ) s2.get( Part.class, partId );
    part2.setName( "Lock Mode Types" );
    t2.commit();
    s2.close();

    // at this point, s1 now contains stale data, so try an hql query which
    // returns said part and make sure we get the previously associated state
    // (i.e., the old name)
    part2 = ( Part ) s1.createQuery( "select p from Part p" ).list().get( 0 );
    assertTrue( part == part2 );
    assertEquals( "encountered non-repeatable read", check, part2.getName() );

    t1.commit();
    s1.close();

    // clean up
    s1 = getSessions().openSession();
    t1 = s1.beginTransaction();
    s1.delete( part2 );
    s1.delete( part2.getItem() );
    t1.commit();
    s1.close();
  }
View Full Code Here

Examples of org.jclouds.io.payloads.Part

            options.contentType(partParam.contentType());
         if (!PartParam.NO_FILENAME.equals(partParam.filename()))
            options.filename(replaceTokens(partParam.filename(), tokenValues));
         Object arg = invocation.getArgs().get(param.hashCode());
         checkNotNull(arg, partParam.name());
         Part part = Part.create(partParam.name(), newPayload(arg), options);
         parts.add(part);
      }
      return parts.build();
   }
View Full Code Here

Examples of org.mizartools.dli.Part

    vid1.setId(vid.getId());
    VariableId vid2 = new VariableId();
    vid2.setId(vid.getId());
    VariableId vid3 = new VariableId();
    vid3.setId(vid.getId());
    Part part = new Part(
        getFormula(abstractSignature, partialDef.getFormula1(), vid1),
        getTerm(abstractSignature, partialDef.getTerm(), vid2),
        getFormula(abstractSignature, partialDef.getFormula2(), vid3));
    return part;
  }
View Full Code Here

Examples of org.openide.text.Line.Part

            getCurrentEngine ();
        if (currentEngine == null) return null;
        JPDADebugger d = currentEngine.lookupFirst(null, JPDADebugger.class);
        if (d == null) return null;

        Part lp = (Part) getAttachedAnnotatable();
        if (lp == null) return null;
        Line line = lp.getLine ();
        DataObject dob = DataEditorSupport.findDataObject (line);
        if (dob == null) return null;
        EditorCookie ec = dob.getCookie(EditorCookie.class);
        if (ec == null)
            return null;
View Full Code Here

Examples of org.openpnp.model.Part

              0,
              placementRotation));
      Configuration cfg = Configuration.get();
            if (cfg != null && createMissingParts) {
                String partId = pkgName + "-" + partValue;
                Part part = cfg.getPart(partId);
                if (part == null) {
                    part = new Part(partId);
                    Package pkg = cfg.getPackage(pkgName);
                    if (pkg == null) {
                        pkg = new Package(pkgName);
                        cfg.addPackage(pkg);
                    }
                    part.setPackage(pkg);

                    cfg.addPart(part);
                }
                placement.setPart(part);
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.