Package hidb2.kern

Examples of hidb2.kern.StatKit


   * @param parent
   * @param f
   */
  public static void BrowseCard(Shell parent, Folder f)
    {
    AttributedDescription descr = ((FolderDescription) f.getDescription()).getCardDescription();

    Attribut a1 = descr.find(AttrType.T_Image);
    if (a1 != null)
      {
      int attrIdx = descr.getAttributList().indexOf(a1);

      List<Card> lstCard = f.getLstCard();

      List<File> lstFic = new ArrayList<File>(lstCard.size());

View Full Code Here


              Folder f = (Folder) ((IStructuredSelection) selection).getFirstElement();

              ISelection selCard = _tabvCard.getSelection();
              if (!selCard.isEmpty())
                {
                Card crd = (Card) ((IStructuredSelection) selCard).getFirstElement();

                /* int res = */Application.getDataStore().remove(f, crd);

                setDirty(true);

View Full Code Here

        res = dlg.open(lstDelta);
        if (res == C_OK)
          {
          for (DeltaMMFile dmmfic : lstDelta)
            {
            Card fcd = dmmfic.getFoundCard();

            switch (dmmfic.getAction())
              {
              case CREATE:
                Card nc = Application.getDataStore().createCard(f);
                nc.setValue(attrIdx, dmmfic.getAttrFile());
                break;

              case DELETE:
                Application.getDataStore().remove(f, fcd);
                break;
View Full Code Here

         */
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          // Create the Card
          Card ncd = Application.getDataStore().createCard(_inpFn.getFolder());

          int nwcardidx = _inpFn.getFolder().getLstCard().indexOf(ncd);

          setCard(nwcardidx);

View Full Code Here

                {
                // Display search results
                for (FolderSearchResult fsr : lstSR)
                  {
                  FolderDescription fd = null;
                  CardDescription cd = null;
                  boolean isCard = false;

                  // Retrieve FolderDescription
                  AttributedDescription ad = das.find(fsr.getTableName());

                  if (ad instanceof CardDescription)
                    {
                    cd = (CardDescription) ad;
                    fd = cd.getParent();
                    isCard = true;
                    }
                  else
                    {
                    if (ad instanceof FolderDescription)
View Full Code Here

              fullname = _fd.open();

              if (fullname != null)
                {               
                // Find & Use correct DataPath               
                DataPath rDp = Application.getDataStore().findDataPath(fullname);

                ai.setDataPath(rDp);

                if (rDp != null)
                  {
                  fullname = fullname.substring(rDp.getPath().length());
                  }

                ai.setValue(fullname);

                if (ai.getStatus() == StatusCycle.UNCHANGED)
View Full Code Here

            fullname = _fd.open();

            if (fullname != null)
              {
              // Find & Use correct DataPath               
              DataPath rDp = Application.getDataStore().findDataPath(fullname);

              _attrImg.setDataPath(rDp);

              if (rDp != null)
                {
                fullname = fullname.substring(rDp.getPath().length());
                }

              _attrImg.setValue(fullname);

              if (_attrImg.getStatus() == StatusCycle.UNCHANGED)
View Full Code Here

        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvDp.getSelection();
          Object obj = ((IStructuredSelection) selection).getFirstElement();
          DataPath dp = (DataPath) obj;
          int[] tabImpacted = Application.getDataStore().getDataPathUsage(dp);

          int nbref = 0;
          StringBuffer str = new StringBuffer(256);

          for (AttrType at : AttrType.values())
            {
            if (at.extended)
              {
              if (tabImpacted[at.ordinal()] > 0)
                {
                nbref += tabImpacted[at.ordinal()];
                str.append("Type ").append(at).append(" : ").append(tabImpacted[at.ordinal()]);
                }
              }
            }

          if (nbref > 0)
            {
            // Deletion not possible when
            MessageDialog.openWarning(_tabvDp.getControl().getShell(), "Delete DataPath", "Deletion of Datapath:"
                + dp.getName() + "impossible due to\n" + str.toString() + "\nUse Replace before");
            }
          else
            {
            // Get confirmation
            boolean rb = MessageDialog.openConfirm(_tabvDp.getControl().getShell(), "Delete DataPath",
                "Do you confirm the deletion of Datapath:" + dp.getName());

            if (rb)
              {
              // Execute the deletion
              Application.getDataStore().remove(dp);

              _tabvDp.refresh();
              }
            }
          }
      });

    _tabvDp.createMMI();

    // Replace the default content provider by a filtered one
    // Must be done after the createMMI
    _tabvDp.setContentProvider(new IStructuredContentProvider()
      {
        @SuppressWarnings("unchecked")
        public Object[] getElements(Object inputElement)
          {
          List<DataPath> ldp = (List<DataPath>) inputElement;

          List<DataPath> ldpf = new ArrayList<DataPath>(ldp.size());
          for (DataPath dp : ldp)
            {
            if (dp.getStatus() != StatusCycle.DELETED)
              {
              ldpf.add(dp);
              }
            }
View Full Code Here

                fullname = _fd.open();

                if (fullname != null)
                  {
                  // Find & Use correct DataPath               
                  DataPath rDp = Application.getDataStore().findDataPath(fullname);

                  ai.setDataPath(rDp);

                  if (rDp != null)
                    {
                    fullname = fullname.substring(rDp.getPath().length());
                    }

                  ai.setValue(fullname);

                  if (ai.getStatus() == StatusCycle.UNCHANGED)
View Full Code Here

        IRunnableWithProgress op = new IRunnableWithProgress()
          {
            public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
              {
              int rc = C_OK;
              DataStore das = Application.getDataStore();

              List<FolderSearchResult> lstSR = das.search(_query);
              if (rc == C_OK)
                {
                // Display search results
                for (FolderSearchResult fsr : lstSR)
                  {
                  FolderDescription fd = null;
                  CardDescription cd = null;
                  boolean isCard = false;

                  // Retrieve FolderDescription
                  AttributedDescription ad = das.find(fsr.getTableName());

                  if (ad instanceof CardDescription)
                    {
                    cd = (CardDescription) ad;
                    fd = cd.getParent();
                    isCard = true;
                    }
                  else
                    {
                    if (ad instanceof FolderDescription)
                      {
                      fd = (FolderDescription) ad;
                      }
                    }

                  if (fd != null) // Ignore ListDescription
                    {
                    _cubicView.addFolderDescription(fd);
                    for (int id : fsr.getKeys())
                      {
                      Folder f = isCard ? das.find(cd, id) : das.find(fd, id);

                      _cubicView.addFolder(f);
                      }
                    }
                  }
View Full Code Here

TOP

Related Classes of hidb2.kern.StatKit

Copyright © 2018 www.massapicom. 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.