blob: ee81f46c5308a9808a1c7f2a9cd3117ec7a18c51 [file] [log] [blame]
//------------------------------------------------------------------------------
// Copyright (c) 2005, 2007 IBM Corporation and others.
// 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:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
package org.eclipse.epf.library.edit;
/**
* Stores (in memory only) the Flat/Hierarchical plugin-package layout
* @author Jeff Hardy
*
*/
public class PluginUIPackageContext {
public static final PluginUIPackageContext INSTANCE = new PluginUIPackageContext();
private boolean isFlatLayout = false;
public static final String HIERARCHICAL_LAYOUT= "hierarchical"; //$NON-NLS-1$
public static final String FLAT_LAYOUT= "flat"; //$NON-NLS-1$
public boolean isFlatLayout() {
return isFlatLayout;
}
public void toggleLayout() {
isFlatLayout = !isFlatLayout;
}
public String getLayoutAsString() {
if (isFlatLayout()) {
return FLAT_LAYOUT;
} else {
return HIERARCHICAL_LAYOUT;
}
}
public void setLayoutHierarchical() {
isFlatLayout = false;
}
public void setLayoutFlat() {
isFlatLayout = true;
}
}