X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FdiagramEditor%2FEditorState.java;h=44faa8420181a0ec530ca41ca3923f62ccba887c;hb=560d8aa2e37cb6b0249aec6d7e96e67d5a64c59f;hp=1579d4e2ba6c8c4c0195c4f35b89a53bc23393b3;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/EditorState.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/EditorState.java index 1579d4e2b..44faa8420 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/EditorState.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/EditorState.java @@ -1,43 +1,43 @@ -/******************************************************************************* - * Copyright (c) 2007, 2011 Association for Decentralized Information Management in - * Industry THTH ry. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.modeling.ui.diagramEditor; - -import java.awt.geom.AffineTransform; -import java.util.Collections; -import java.util.Set; - -import org.simantics.db.Resource; -import org.simantics.g2d.canvas.Hints; -import org.simantics.g2d.canvas.IToolMode; - -/** - * @author Tuukka Lehtonen - */ -public class EditorState { - - public AffineTransform viewTransform; - - public Set selection = Collections.emptySet(); - - public String toolMode; - - public IToolMode toToolMode() { - if (Hints.POINTERTOOL.getId().equals(toolMode)) - return Hints.POINTERTOOL; - else if (Hints.PANTOOL.getId().equals(toolMode)) - return Hints.PANTOOL; - else if (Hints.CONNECTTOOL.getId().equals(toolMode)) - return Hints.CONNECTTOOL; - return null; - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * 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: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.modeling.ui.diagramEditor; + +import java.awt.geom.AffineTransform; +import java.util.Collections; +import java.util.Set; + +import org.simantics.db.Resource; +import org.simantics.g2d.canvas.Hints; +import org.simantics.g2d.canvas.IToolMode; + +/** + * @author Tuukka Lehtonen + */ +public class EditorState { + + public AffineTransform viewTransform; + + public Set selection = Collections.emptySet(); + + public String toolMode; + + public IToolMode toToolMode() { + if (Hints.POINTERTOOL.getId().equals(toolMode)) + return Hints.POINTERTOOL; + else if (Hints.PANTOOL.getId().equals(toolMode)) + return Hints.PANTOOL; + else if (Hints.CONNECTTOOL.getId().equals(toolMode)) + return Hints.CONNECTTOOL; + return null; + } + +}