[Escapek-commits] SF.net SVN: escapek: [815] org.escapek.client.ui.security/trunk/src/org/ escapek
Status: Pre-Alpha
Brought to you by:
nicolasjouanin
Revision: 815
http://svn.sourceforge.net/escapek/?rev=815&view=rev
Author: nicolasjouanin
Date: 2007-02-15 12:47:54 -0800 (Thu, 15 Feb 2007)
Log Message:
-----------
Code cleanup.
Make code 3.3M5 API compatible
Added Paths:
-----------
org.escapek.client.ui.security/trunk/src/org/escapek/client/ui/security/editors/forms/providers/ObservableRoleLabelProvider.java
Added: org.escapek.client.ui.security/trunk/src/org/escapek/client/ui/security/editors/forms/providers/ObservableRoleLabelProvider.java
===================================================================
--- org.escapek.client.ui.security/trunk/src/org/escapek/client/ui/security/editors/forms/providers/ObservableRoleLabelProvider.java (rev 0)
+++ org.escapek.client.ui.security/trunk/src/org/escapek/client/ui/security/editors/forms/providers/ObservableRoleLabelProvider.java 2007-02-15 20:47:54 UTC (rev 815)
@@ -0,0 +1,66 @@
+/**
+ * Escape-K
+ * Copyright (C) 2006 Nicolas Jouanin, and individual contributors
+ * as indicated by the @authors tag. See copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ * Contact: es...@gm...
+ *
+ * This file is part of Escape-K.
+ *
+ * Escape-K is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Escape-K is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Foobar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * --------------------------------------------------------------------------
+ * $Id$
+ * --------------------------------------------------------------------------
+ */
+package org.escapek.client.ui.security.editors.forms.providers;
+
+import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.escapek.client.ui.SharedImages;
+
+/**
+ *
+ * @author nicolasjouanin
+ *
+ */
+public class ObservableRoleLabelProvider extends ObservableMapLabelProvider
+{
+ public ObservableRoleLabelProvider(IObservableMap attributeMap)
+ {
+ super(attributeMap);
+ }
+
+ public ObservableRoleLabelProvider(IObservableMap[] attributeMaps)
+ {
+ super(attributeMaps);
+ }
+
+ @Override
+ public Image getImage(Object element)
+ {
+ return SharedImages.getImage(SharedImages.IMAGE_GROUP);
+ }
+
+ @Override
+ public Image getColumnImage(Object element, int columnIndex)
+ {
+ if(columnIndex == 0)
+ return getImage(element);
+ else
+ return super.getColumnImage(element, columnIndex);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|