You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ge...@apache.org on 2005/08/25 00:52:26 UTC
svn commit: r239957 - in
/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui: plugin.xml
src/org/apache/geronimo/ui/sections/ServerSecurityEditorSection.java
Author: geirm
Date: Wed Aug 24 15:52:22 2005
New Revision: 239957
URL: http://svn.apache.org/viewcvs?rev=239957&view=rev
Log:
GERONIMO-899 - patch from Sachin
Added:
geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerSecurityEditorSection.java
Modified:
geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml
Modified: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml?rev=239957&r1=239956&r2=239957&view=diff
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml (original)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/plugin.xml Wed Aug 24 15:52:22 2005
@@ -46,6 +46,16 @@
enablesFor="1">
</action>
</objectContribution>
- </extension>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.editorPageSections">
+ <section
+ id="org.apache.server.geronimo.security"
+ order="10"
+ insertionId="org.eclipse.wst.server.editor.overview.left"
+ typeIds="org.eclipse.jst.server.geronimo.10"
+ class="org.apache.geronimo.ui.sections.ServerSecurityEditorSection">
+ </section>
+ </extension>
</plugin>
Added: geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerSecurityEditorSection.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerSecurityEditorSection.java?rev=239957&view=auto
==============================================================================
--- geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerSecurityEditorSection.java (added)
+++ geronimo/trunk/sandbox/eclipse-plugin/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerSecurityEditorSection.java Wed Aug 24 15:52:22 2005
@@ -0,0 +1,110 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.ui.sections;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+
+/**
+ *
+ *
+ */
+public class ServerSecurityEditorSection extends ServerEditorSection {
+
+ /**
+ *
+ */
+ public ServerSecurityEditorSection() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#createSection(org.eclipse.swt.widgets.Composite)
+ */
+ public void createSection(Composite parent) {
+ super.createSection(parent);
+
+ FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+ Section section = toolkit.createSection(parent,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.FOCUS_TITLE);
+
+ section.setText("Security Settings");
+ section.setDescription("Provide security settings for the server.");
+ section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+ Composite composite = toolkit.createComposite(section);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginHeight = 5;
+ layout.marginWidth = 10;
+ layout.verticalSpacing = 5;
+ layout.horizontalSpacing = 15;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ section.setClient(composite);
+
+ // ------- Label and text field for the username -------
+ createLabel(composite, "Username:", toolkit);
+
+ Text username = toolkit.createText(composite, "system", SWT.BORDER);
+ username.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ username.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+
+ }
+ });
+
+ // ------- Label and text field for the password -------
+ createLabel(composite, "Password:", toolkit);
+
+ Text password = toolkit
+ .createText(composite, "password", SWT.BORDER);
+ password
+ .setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+ password.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+
+ }
+ });
+
+ }
+
+ protected Label createLabel(Composite parent, String text,
+ FormToolkit toolkit) {
+ Label label = toolkit.createLabel(parent, text);
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
+ label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+ return label;
+ }
+
+}