summaryrefslogtreecommitdiff
path: root/propertysheet/src/org/eclipse/wb/internal/core/model/property/editor/presentation/ButtonPropertyEditorPresentation.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-03-22 14:04:46 -0700
committerTor Norbye <tnorbye@google.com>2012-03-22 14:04:46 -0700
commitc0ecc89c7fa48c6e5ab3c7635863a6e8d2b28137 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /propertysheet/src/org/eclipse/wb/internal/core/model/property/editor/presentation/ButtonPropertyEditorPresentation.java
parent562c581f49027009d6e99ba7b0162c53a051b1c4 (diff)
downloadeclipse-windowbuilder-c0ecc89c7fa48c6e5ab3c7635863a6e8d2b28137.tar.gz
Revert "Add WindowBuilder propertysheet code. See README.txt for details."
This reverts commit 562c581f49027009d6e99ba7b0162c53a051b1c4.
Diffstat (limited to 'propertysheet/src/org/eclipse/wb/internal/core/model/property/editor/presentation/ButtonPropertyEditorPresentation.java')
-rw-r--r--propertysheet/src/org/eclipse/wb/internal/core/model/property/editor/presentation/ButtonPropertyEditorPresentation.java114
1 files changed, 0 insertions, 114 deletions
diff --git a/propertysheet/src/org/eclipse/wb/internal/core/model/property/editor/presentation/ButtonPropertyEditorPresentation.java b/propertysheet/src/org/eclipse/wb/internal/core/model/property/editor/presentation/ButtonPropertyEditorPresentation.java
deleted file mode 100644
index e33970d..0000000
--- a/propertysheet/src/org/eclipse/wb/internal/core/model/property/editor/presentation/ButtonPropertyEditorPresentation.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Google, Inc.
- * 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:
- * Google, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wb.internal.core.model.property.editor.presentation;
-
-import org.eclipse.wb.internal.core.DesignerPlugin;
-import org.eclipse.wb.internal.core.EnvironmentUtils;
-import org.eclipse.wb.internal.core.model.property.Property;
-import org.eclipse.wb.internal.core.model.property.table.PropertyTable;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Button;
-
-/**
- * Implementation of {@link PropertyEditorPresentation} for displaying {@link Button}.
- *
- * @author scheglov_ke
- * @author mitin_aa
- * @coverage core.model.property.editor
- */
-public abstract class ButtonPropertyEditorPresentation extends PropertyEditorPresentation {
- private final int m_style;
- private final ButtonPropertyEditorPresentationImpl m_impl;
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Constructors
- //
- ////////////////////////////////////////////////////////////////////////////
- public ButtonPropertyEditorPresentation() {
- this(SWT.NONE);
- }
-
- public ButtonPropertyEditorPresentation(int style) {
- m_style = style;
- m_impl =
- EnvironmentUtils.IS_MAC
- ? new ButtonPropertyEditorPresentationImplMac(this)
- : new ButtonPropertyEditorPresentationImpl(this);
- }
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Access
- //
- ////////////////////////////////////////////////////////////////////////////
- /**
- * Sets "selection" property of {@link Button}.
- */
- public final void setSelection(PropertyTable propertyTable, Property property, boolean selected) {
- m_impl.setSelection(propertyTable, property, selected);
- }
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // PropertyEditorPresentation
- //
- ////////////////////////////////////////////////////////////////////////////
- @Override
- public final int show(final PropertyTable propertyTable,
- final Property property,
- final int x,
- final int y,
- final int width,
- final int height) {
- return m_impl.show(propertyTable, property, x, y, width, height);
- }
-
- @Override
- public final void hide(PropertyTable propertyTable, Property property) {
- m_impl.hide(propertyTable, property);
- }
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Access
- //
- ////////////////////////////////////////////////////////////////////////////
- final int getStyle() {
- return m_style;
- }
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Implementation
- //
- ////////////////////////////////////////////////////////////////////////////
- /**
- * @return the {@link Image} to display on {@link Button}.
- */
- protected Image getImage() {
- return DesignerPlugin.getImage("properties/dots.gif");
- }
-
- /**
- * @return the tooltip text to display for {@link Button}.
- */
- protected String getTooltip() {
- return null;
- }
-
- /**
- * Handles click on {@link Button}.
- */
- protected abstract void onClick(PropertyTable propertyTable, Property property) throws Exception;
-}