Package hidb2.kern

Examples of hidb2.kern.FolderDescription


      {
        public void widgetSelected(SelectionEvent e)
          {
          int idx = _cmbDescr.getSelectionIndex();

          FolderDescription nfd = Application.getDataStore().getFolderDescriptionList().get(idx);

          if (_query.fd != nfd)
            {
            _query.fd = nfd;
            String[] tblAttrName = new String[nfd.getAttributList().size()];
            int i = 0;
            for (Attribut a : nfd.getAttributList())
              {
              tblAttrName[i++] = a.getName();
              }

            _cmbCellEditor.setItems(tblAttrName);
View Full Code Here


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

    try
      {
      // Open the default database
      String dbDir = Activator.getDefault().getPreferenceStore().getString(PrefConst.P_DB_DIR);

      _das = new H2DataStore(dbDir);

      int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
      if (returnCode == PlatformUI.RETURN_RESTART)
        {
        return IApplication.EXIT_RESTART;
View Full Code Here

    try
      {
      // Open the default database
      String dbDir = Activator.getDefault().getPreferenceStore().getString(PrefConst.P_DB_DIR);

      _das = new H2DataStore(dbDir);

      if (_das.getOpenStatus() == HIDBConst.C_OK)
        {
        int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
        if (returnCode == PlatformUI.RETURN_RESTART)
View Full Code Here

    /*Button btnAddAfter =*/toolkit.createGridButton(containerBtn, "Add", new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          QueryAttr qa = new QueryAttr();
          _query.lstQAttr.add(qa);
          _tbl.refresh();
          }
      });

    /*Button btnRem =*/toolkit.createGridButton(containerBtn, "Delete", new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tbl.getSelection();
          if (!selection.isEmpty())
            {
            Object obj = ((IStructuredSelection) selection).getFirstElement();
            QueryAttr qattr = (QueryAttr) obj;

            // Execute the deletion
            _query.lstQAttr.remove(qattr);

            _tbl.refresh();
View Full Code Here

      Image img = null;

      // The Element is a ValuedInstance
      if (_mapAttr[columnIndex].getType() == AttrType.T_Image)
        {
        ValuedInstance vi = (ValuedInstance) element;

        AttrImage ai = (AttrImage) vi.getValue(_mapIdx[columnIndex]);

        if (ai != null)
          {
          img = ai.getSqrImage(getTable().getDisplay(), _maxIconSize);
          }
View Full Code Here

      }

    public String getColumnText(Object element, int columnIndex)
      {
      // The Element is a ValuedInstance
      ValuedInstance vi = (ValuedInstance) element;

      Object val = vi.getValue(_mapIdx[columnIndex]);

      String s = _mapAttr[columnIndex].format(val);

      return s;
      }
View Full Code Here

      _colIdx = colIndex;
      }

    public int compare(Viewer viewer, Object e1, Object e2)
      {
      ValuedInstance vi1 = (ValuedInstance) e1;
      ValuedInstance vi2 = (ValuedInstance) e2;

      return Util.compare((Comparable<?>) vi1.getValue(_mapIdx[_colIdx]), (Comparable<?>) vi2
          .getValue(_mapIdx[_colIdx]));
      }
View Full Code Here

    @Override
    public Object getValue(Object element, String property)
      {
      int idx = getPropIndex(property);

      ValuedInstance vi = (ValuedInstance) element;

      Object o = vi.getValue(_mapIdx[idx]);

      Attribut attr = _fd.getAttributList().get(_mapIdx[idx]);

      if ((attr.getType() == AttrType.T_RefList) && (o != null))
        {
View Full Code Here

    public void modify(Object element, String property, Object value)
      {
      if (value != null)
        {
        int idx = getPropIndex(property);
        ValuedInstance vi = (ValuedInstance) ((TableItem) element).getData();

        Attribut attr = _fd.getAttributList().get(_mapIdx[idx]);

        switch (attr.getType())
          {
          case T_Date:
            value = new java.sql.Date(((Date) value).getTime());
            break;

          case T_Time:
            value = new Time(((Date) value).getTime());
            break;

          case T_TimeStamp:
            value = new Timestamp(((Date) value).getTime());
            break;

          case T_RefList:
            int index = (Integer) value;

            AttrEnumItemChecker aei = (AttrEnumItemChecker) attr.getChecker();

            value = aei.getLstEnumItem().get(index);
            break;
          }

        vi.setValue(_mapIdx[idx], value);

        update(vi, new String[]
          {
            property
          });
View Full Code Here

TOP

Related Classes of hidb2.kern.FolderDescription

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.