Examples of TrimDescriptor


Examples of org.eclipse.ui.internal.layout.TrimDescriptor

         
          // Walk the trim area and return the first one that the positon
          // is 'after'.
          List tDescs = layout.getTrimArea(areaId).getDescriptors();
          for (Iterator iter = tDescs.iterator(); iter.hasNext();) {
        TrimDescriptor desc = (TrimDescriptor) iter.next();
       
        // Skip ourselves
        if (desc.getTrim() == draggedTrim) {
          continue;
        }
       
        // Now, check
        Rectangle bb = desc.getCache().getControl().getBounds();
        Point center = Geometry.centerPoint(bb);
        if (isHorizontal) {
          if (pos.x < center.x) {
            return desc.getTrim();
          }
        }
        else {
          if (pos.y < center.y) {
            return desc.getTrim();
          }
        }
      }
         
          return null;
View Full Code Here

Examples of org.eclipse.ui.internal.layout.TrimDescriptor

         * @return The trim that the given trim is 'before'
         */
        private IWindowTrim getInsertBefore(int areaId, IWindowTrim trim) {
          List tDescs = layout.getTrimArea(areaId).getDescriptors();
          for (Iterator iter = tDescs.iterator(); iter.hasNext();) {
        TrimDescriptor desc = (TrimDescriptor) iter.next();
        if (desc.getTrim() == trim) {
          if (iter.hasNext()) {
            desc = (TrimDescriptor) iter.next();
            return desc.getTrim();
          }
          return null;
        }
      }
         
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.