Example #1
0
    /*
     * @see org.gamegineer.table.core.AbstractContainerLayout#getComponentOffsetAt(org.gamegineer.table.core.IContainer, int)
     */
    @Override
    protected Dimension getComponentOffsetAt(final IContainer container, final int index) {
      assertArgumentLegal(
          index >= 0,
          "index",
          NonNlsMessages
              .ContainerLayouts_NullContainerLayout_getComponentOffsetAt_index_negative); //$NON-NLS-1$

      final Point containerOrigin = container.getOrigin();
      final Point componentLocation = container.getComponent(index).getLocation();
      return new Dimension(
          componentLocation.x - containerOrigin.x, componentLocation.y - containerOrigin.y);
    }