Home | History | Annotate | Download | only in flyout
      1 /*******************************************************************************
      2  * Copyright (c) 2011 Google, Inc.
      3  * All rights reserved. This program and the accompanying materials
      4  * are made available under the terms of the Eclipse Public License v1.0
      5  * which accompanies this distribution, and is available at
      6  * http://www.eclipse.org/legal/epl-v10.html
      7  *
      8  * Contributors:
      9  *    Google, Inc. - initial API and implementation
     10  *******************************************************************************/
     11 package org.eclipse.wb.core.controls.flyout;
     12 
     13 /**
     14  * Implementation of {@link IFlyoutPreferences} for keeping settings in memory.
     15  *
     16  * @author scheglov_ke
     17  * @coverage core.control
     18  */
     19 public final class MemoryFlyoutPreferences implements IFlyoutPreferences {
     20   private int m_dockLocation;
     21   private int m_state;
     22   private int m_width;
     23 
     24   ////////////////////////////////////////////////////////////////////////////
     25   //
     26   // Constructor
     27   //
     28   ////////////////////////////////////////////////////////////////////////////
     29   public MemoryFlyoutPreferences(int dockLocation, int state, int width) {
     30     m_dockLocation = dockLocation;
     31     m_state = state;
     32     m_width = width;
     33   }
     34 
     35   ////////////////////////////////////////////////////////////////////////////
     36   //
     37   // IFlyoutPreferences
     38   //
     39   ////////////////////////////////////////////////////////////////////////////
     40   public int getDockLocation() {
     41     return m_dockLocation;
     42   }
     43 
     44   public int getState() {
     45     return m_state;
     46   }
     47 
     48   public int getWidth() {
     49     return m_width;
     50   }
     51 
     52   public void setDockLocation(int location) {
     53     m_dockLocation = location;
     54   }
     55 
     56   public void setState(int state) {
     57     m_state = state;
     58   }
     59 
     60   public void setWidth(int width) {
     61     m_width = width;
     62   }
     63 }