Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Cleaned up documentation.
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Wojtowicz <wojtowicza@ornl.gov>
  • Loading branch information
Anna Wojtowicz committed Apr 16, 2015
1 parent b26967f commit 877c681
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 144 deletions.
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012, 2014 UT-Battelle, LLC.
* Copyright (c) 2012, 2014- UT-Battelle, LLC.
* 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
Expand Down Expand Up @@ -53,7 +53,6 @@
import org.eclipse.ui.forms.IMessageManager;

/**
* <!-- begin-UML-doc -->
* <p>
* This is an subclass of SWT's Composite class made specifically to work with
* ICE Entries.
Expand All @@ -67,90 +66,43 @@
* The EntryComposite can post messages about its work with an Entry to a
* IMessageManager if it is set by calling setMessageManager().
* </p>
* <!-- end-UML-doc -->
*
* @author gqx
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public class EntryComposite extends Composite implements IUpdateableListener {
/**
* <!-- begin-UML-doc -->
* <p>
* A label that describes the Entry.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private Label label;

/**
* <!-- begin-UML-doc -->
* <p>
* A text field that is used if the Entry type is unspecified.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private Text text;

/**
* <!-- begin-UML-doc -->
* <p>
* A drop-down menu for the Entry.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private Combo dropDown;

/**
* <!-- begin-UML-doc -->
* <p>
* A set of buttons for the Entry.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected final List<Button> buttons;

/**
* <!-- begin-UML-doc -->
* <p>
* The Entry that is displayed by the EntryComposite.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected Entry entry;

/**
* <!-- begin-UML-doc -->
* <p>
* The message manager to which message about the success or failure of
* manipulating the Entry should be posted.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private IMessageManager messageManager;

/**
* <!-- begin-UML-doc -->
* <p>
* The name of the message posted to the message manager.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private String messageName;

Expand All @@ -172,31 +124,18 @@ public class EntryComposite extends Composite implements IUpdateableListener {
private ControlListener resizeListener = null;

/**
* <!-- begin-UML-doc -->
* <p>
* The Constructor
* </p>
* <!-- end-UML-doc -->
*
* @param parent
* <p>
* The parent Composite.
* </p>
* @param style
* <p>
* The style of the EntryComposite.
* </p>
* @param refEntry
* <p>
* An Entry that should be used to create the widget, to update
* when changed by the user and to be updated from when changed
* internally by ICE.
* </p>
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public EntryComposite(Composite parent, int style, Entry refEntry) {
// begin-user-code

// Call the super constructor
super(parent, style);
Expand Down Expand Up @@ -246,7 +185,6 @@ public void widgetDisposed(DisposeEvent e) {
render();

return;
// end-user-code
}

/**
Expand All @@ -259,13 +197,9 @@ public Entry getEntry() {
}

/**
* <!-- begin-UML-doc --> <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
* Creates a label for the EntryComposite.
*/
private void createLabel() {
// begin-user-code

// Create the Label
label = new Label(this, SWT.WRAP);
Expand All @@ -274,17 +208,12 @@ private void createLabel() {
label.setBackground(getBackground());

return;
// end-user-code
}

/**
* <!-- begin-UML-doc --> <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
* Creates a checkbox for the EntryComposite.
*/
private void createCheckbox() {
// begin-user-code

// Local Declarations
Button tmpButton = null;
Expand Down Expand Up @@ -328,21 +257,12 @@ public void widgetSelected(SelectionEvent e) {
tmpButton.setBackground(getBackground());
buttons.add(tmpButton);

// end-user-code
}

/**
* <!-- begin-UML-doc -->
* <p>
* This operation creates buttons on the Composite.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private void createButtons() {
// begin-user-code

// Local Declarations
Button tmpButton = null;
Expand Down Expand Up @@ -374,21 +294,12 @@ public void widgetSelected(SelectionEvent e) {
}

return;
// end-user-code
}

/**
* <!-- begin-UML-doc -->
* <p>
* This operation creates a drop-down menu on the Composite.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private void createDropdown() {
// begin-user-code

// Create a drop-down menu
dropDown = new Combo(this, SWT.DROP_DOWN | SWT.SINGLE | SWT.V_SCROLL
Expand Down Expand Up @@ -421,21 +332,12 @@ public void widgetSelected(SelectionEvent e) {
});

return;
// end-user-code
}

/**
* <!-- begin-UML-doc -->
* <p>
* This operation creates a textfield on the Composite.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
private void createTextfield() {
// begin-user-code

// Create a textfield
if (!entry.isSecret()) {
Expand Down Expand Up @@ -474,7 +376,6 @@ public void handleEvent(Event e) {
text.addListener(SWT.DefaultSelection, enterListener);

return;
// end-user-code
}

/**
Expand Down Expand Up @@ -519,17 +420,9 @@ public void widgetSelected(SelectionEvent e) {
}

/**
* <!-- begin-UML-doc -->
* <p>
* This operation renders the SWT widgets for the Entry.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected void render() {
// begin-user-code

// Local Declarations
int numAllowedValues = 0, maxValueLength = 12, maxShortValues = 8;
Expand Down Expand Up @@ -680,7 +573,6 @@ public void controlResized(ControlEvent e) {
setLayout(layout);

return;
// end-user-code
}

/**
Expand Down Expand Up @@ -715,19 +607,11 @@ private void throwMissingValuesError() {
}

/**
* <!-- begin-UML-doc -->
* <p>
* This operation directs the EntryComposite to refresh its view of the
* Entry. This should be called in the event that the Entry has changed on
* the file system and the view needs to be updated.
* </p>
* <!-- end-UML-doc -->
*
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void refresh() {
// begin-user-code

// Dispose of the old widgets
if (dropDown != null) {
Expand Down Expand Up @@ -770,49 +654,31 @@ public void refresh() {
layout();

return;
// end-user-code
}

/**
* <!-- begin-UML-doc -->
* <p>
* This operation sets the Message Manager that should be used by the
* EntryComposite to post messages about the Entry. If the Message Manager
* is not set, the EntryComposite will not attempt to post messages.
* </p>
* <!-- end-UML-doc -->
*
* @param manager
* <p>
* The Message Manager that the EntryComposite should use.
* </p>
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
public void setMessageManager(IMessageManager manager) {
// begin-user-code

// Set the messageManager
messageManager = manager;

return;
// end-user-code
}

/**
* <!-- begin-UML-doc -->
* <p>
* This operation sets the value of the Entry and, if possible and
* necessary, reports to the message manager.
* </p>
* <!-- end-UML-doc -->
*
* @param value
* @generated
* "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
*/
protected void setEntryValue(String value) {
// begin-user-code

// Set the value and post a message if necessary
if (!entry.setValue(value) && messageManager != null) {
Expand Down Expand Up @@ -854,7 +720,6 @@ protected void setEntryValue(String value) {
}

return;
// end-user-code
}

int hitCounter = 0;
Expand Down
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2014 UT-Battelle, LLC.
* Copyright (c) 2014- UT-Battelle, LLC.
* 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
Expand Down

0 comments on commit 877c681

Please sign in to comment.