| /******************************************************************************* |
| * Copyright (c) 2006 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 API and implementation |
| *******************************************************************************/ |
| package org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.ui.properties.sections; |
| |
| import org.eclipse.emf.ecore.EAttribute; |
| import org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.HockeyleaguePackage; |
| import org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.Player; |
| |
| /** |
| * A section for the jersey number property of a selected player Object. |
| * |
| * @author Anthony Hunter |
| */ |
| public class NumberPropertySection |
| extends AbstractIntegerPropertySection { |
| |
| /** |
| * @see org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.ui.properties.sections.AbstractStringPropertySection#getFeature() |
| */ |
| protected EAttribute getFeature() { |
| return HockeyleaguePackage.eINSTANCE.getPlayer_Number(); |
| } |
| |
| /** |
| * @see org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.ui.properties.sections.AbstractStringPropertySection#getFeatureText() |
| */ |
| protected Integer getFeatureInteger() { |
| return new Integer(((Player) eObject).getNumber()); |
| } |
| |
| /** |
| * @see org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.ui.properties.sections.AbstractStringPropertySection#getLabelText() |
| */ |
| protected String getLabelText() { |
| return "Jersey Number:";//$NON-NLS-1$ |
| } |
| |
| } |