/******************************************************************************* | |
* <copyright> | |
* | |
* Copyright (c) 2013, 2013 SAP AG. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* SAP AG - initial API, implementation and documentation | |
* | |
* </copyright> | |
* | |
*******************************************************************************/ | |
package org.eclipse.fmc.blockdiagram.editor.algorithm.node; | |
/** | |
* This class encapsulates all operations on a UShape Agent. | |
* | |
* @author Heiko Witteborg | |
* @author Benjamin Schmeling | |
* | |
*/ | |
public class UStorageAlgorithm extends AbstractUPolygonAlgorithm implements | |
StorageAlgorithm { | |
// ---------------------------------------- | |
// ----------- Graphics Node -------------- | |
public static final int USTORAGE_MINIMUM_WIDTH = 30; | |
public static final int USTORAGE_MINIMUM_HEIGHT = 30; | |
public static final int USTORAGE_DEFAULT_WIDTH = 90; | |
public static final int USTORAGE_DEFAULT_HEIGHT = 70; | |
public static final int USTORAGE_DEFAULT_LINEWIDTH = 3; | |
@Override | |
/* | |
* (non-Javadoc) | |
* | |
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getMinimumHeight() | |
*/ | |
public int getMinimumHeight() { | |
return USTORAGE_MINIMUM_HEIGHT; | |
} | |
@Override | |
/* | |
* (non-Javadoc) | |
* | |
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getMinimumWidth() | |
*/ | |
public int getMinimumWidth() { | |
return USTORAGE_MINIMUM_WIDTH; | |
} | |
@Override | |
/* | |
* (non-Javadoc) | |
* | |
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getDefaultHeight() | |
*/ | |
public int getDefaultHeight() { | |
return USTORAGE_DEFAULT_HEIGHT; | |
} | |
@Override | |
/* | |
* (non-Javadoc) | |
* | |
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getDefaultWidth() | |
*/ | |
public int getDefaultWidth() { | |
return USTORAGE_DEFAULT_WIDTH; | |
} | |
@Override | |
/* | |
* (non-Javadoc) | |
* | |
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getDefaultLineWidth() | |
*/ | |
public int getDefaultLineWidth() { | |
return USTORAGE_DEFAULT_LINEWIDTH; | |
} | |
// ---------------------------------------- | |
// ----------- Polygon Impl --------------- | |
@Override | |
/* | |
* (non-Javadoc) | |
* | |
* @see | |
* org.eclipse.fmc.blockdiagram.editor.node.AbstractPolygonAlgorithm#hasRoundedCorners | |
* () | |
*/ | |
public boolean hasRoundedCorners() { | |
return true; | |
} | |
} |