Package hidb2.kern

Examples of hidb2.kern.Attribut


            }
          else
            {
            Object obj = ((IStructuredSelection) selection).getFirstElement();

            Attribut a = (Attribut) obj;

            addidx = a.getDisplayOrder() + 1;
            }

          Attribut at0 = new Attribut(getFD().getID(), T_String);

          getFD().addAttribut(at0, addidx);

          _tabvLdAttr.refresh();
          }
      }, new SelectionAdapter()
      {
        /**
        * Add Before Callback
        */
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvLdAttr.getSelection();
          int addidx = 0;

          if (selection.isEmpty())
            {
            Object obj = ((IStructuredSelection) selection).getFirstElement();

            Attribut a = (Attribut) obj;

            addidx = Math.max(0, a.getDisplayOrder() - 1);
            }

          Attribut at0 = new Attribut(getFD().getID(), T_String);

          getFD().addAttribut(at0, addidx);

          _tabvLdAttr.refresh();
          }
      }, new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvLdAttr.getSelection();
          Object obj = ((IStructuredSelection) selection).getFirstElement();
          Attribut attr = (Attribut) obj;

          // Get confirmation
          boolean rb = MessageDialog.openConfirm(_tabvLdAttr.getControl().getShell(), "Delete Attribute",
              "Do you confirm the deletion of Attribut:" + attr.getName() + "\nType:" + attr.getType().name);

          if (rb)
            {
            // Execute the deletion
            getFD().removeAttribut(attr);

            _tabvLdAttr.refresh();
            }
          }
      }, new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvLdAttr.getSelection();

          if (!selection.isEmpty())
            {
            Object obj = ((IStructuredSelection) selection).getFirstElement();

            Attribut a = (Attribut) obj;

            int r = getFD().changeAttributPosition(a, false);
            if (r == C_OK)
              {
              setDirty(true);
              }

            _tabvLdAttr.refresh();
            }
          }
      }, new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvLdAttr.getSelection();

          if (!selection.isEmpty())
            {
            Object obj = ((IStructuredSelection) selection).getFirstElement();

            Attribut a = (Attribut) obj;

            int r = getFD().changeAttributPosition(a, true);
            if (r == C_OK)
              {
              setDirty(true);
View Full Code Here


      try
        {
//        ISelection selection = viewer.getSelection();
//        Object obj = ((IStructuredSelection) selection).getFirstElement();

        Attribut at0 = new Attribut(_descr.getID(), T_String);

        _descr.addAttribut(at0, 0);

        viewer.refresh();
        }
View Full Code Here

      try
        {
        ISelection selection = viewer.getSelection();
        Object obj = ((IStructuredSelection) selection).getFirstElement();

        Attribut attr = (Attribut) obj;

        // Get confirmation
        boolean rb = MessageDialog.openConfirm(viewer.getControl().getShell(), "Delete Attribute",
            "Do you confirm the deletion of Attribut:" + attr.getName() + "\nType:" + attr.getType().name);

        if (rb)
          {
          // Execute the deletion
          _descr.removeAttribut(attr);
View Full Code Here

                  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();
View Full Code Here

   * @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

                {
                // 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

TOP

Related Classes of hidb2.kern.Attribut

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.