Пример #1
0
 @Override
 public boolean isWhole(Segment segment) {
   DimensionItem dimensionItem = segment.getDimensionItem();
   if (dimensionItem instanceof SheetDimentionItem) {
     return ((SheetDimentionItem) dimensionItem).getBoard().isWhole();
   }
   return false;
 }
Пример #2
0
 @Override
 public List<RestBoardDimension> getRestDimensions(Strips strips) {
   ArrayList<RestBoardDimension> dimensions = new ArrayList<RestBoardDimension>();
   for (Segment segment : strips.getItems()) {
     if (segment.getElements().length > 0) {
       StorageElementLink storageElementLink =
           FacadeContext.getBoardFacade().getStorageElementLinkBy(segment);
       Board board =
           storageElementLink != null
               ? (Board) storageElementLink.getStoreElement()
               : ((SheetDimentionItem) segment.getDimensionItem()).getBoard();
       dimensions.addAll(getFreeDimensions(board, segment));
     }
   }
   return dimensions;
 }