blob: 535771b4deb8d5f5c099373abb12c4845c34a3ba [file] [log] [blame]
/*******************************************************************************
* <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 L-shaped Storage with rounded
* corners.
*
* @author Heiko Witteborg
* @author Benjamin Schmeling
*
*/
public class LStorageAlgorithm extends AbstractLPolygonAlgorithm implements
StorageAlgorithm {
// ----------------------------------------
// ----------- Graphics Node --------------
public static final int LSTORAGE_MINIMUM_WIDTH = 30;
public static final int LSTORAGE_MINIMUM_HEIGHT = 30;
public static final int LSTORAGE_DEFAULT_WIDTH = 70;
public static final int LSTORAGE_DEFAULT_HEIGHT = 70;
public static final int LSTORAGE_DEFAULT_LINEWIDTH = 3;
@Override
/*
* (non-Javadoc)
*
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getMinimumHeight()
*/
public int getMinimumHeight() {
return LSTORAGE_MINIMUM_HEIGHT;
}
@Override
/*
* (non-Javadoc)
*
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getMinimumWidth()
*/
public int getMinimumWidth() {
return LSTORAGE_MINIMUM_WIDTH;
}
@Override
/*
* (non-Javadoc)
*
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getDefaultHeight()
*/
public int getDefaultHeight() {
return LSTORAGE_DEFAULT_HEIGHT;
}
@Override
/*
* (non-Javadoc)
*
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getDefaultWidth()
*/
public int getDefaultWidth() {
return LSTORAGE_DEFAULT_WIDTH;
}
@Override
/*
* (non-Javadoc)
*
* @see org.eclipse.fmc.blockdiagram.editor.node.GraphicsNode#getDefaultLineWidth()
*/
public int getDefaultLineWidth() {
return LSTORAGE_DEFAULT_LINEWIDTH;
}
// ----------------------------------------
// ----------- Polygon Impl ---------------
@Override
/*
* (non-Javadoc)
*
* @see
* org.eclipse.fmc.blockdiagram.editor.node.AbstractPolygonAlgorithm#hasRoundedCorners
* ()
*/
public boolean hasRoundedCorners() {
return true;
}
}