Skip to content

Commit

Permalink
Added new getXXX functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mmpcn committed Feb 27, 2014
1 parent 55f5eae commit b9a9f30
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions splat/src/main/uk/ac/starlink/splat/vo/AddNewServerFrame.java
Expand Up @@ -28,7 +28,10 @@
import java.beans.PropertyChangeSupport;

//import uk.ac.starlink.util.gui.ErrorDialog;
import uk.ac.starlink.table.DescribedValue;
import uk.ac.starlink.table.StarTable;
import uk.ac.starlink.vo.RegResource;
import uk.ac.starlink.votable.VOStarTable;

/**
* Class AddNewServerFrame
Expand Down Expand Up @@ -57,6 +60,8 @@ public class AddNewServerFrame
private JPanel centrePanel = null;
private JPanel buttonsPanel = null;

private String type="";

/**
* The server list to be updated
*/
Expand All @@ -66,6 +71,8 @@ public class AddNewServerFrame
/**
* Create an instance.
*/


public AddNewServerFrame()
{
initUI();
Expand All @@ -74,6 +81,16 @@ public AddNewServerFrame()
status=0;
statusChange= new PropertyChangeSupport(this);
}

public AddNewServerFrame( String type ) {
this.type = type;
initUI();
initMenus();
initFrame();
status=0;
statusChange= new PropertyChangeSupport(this);
}


/**
* Initialise the main part of the user interface.
Expand All @@ -97,7 +114,9 @@ private void initUI()
*/
private void initFrame()
{
setTitle( "Add New SSAP Service" );

setTitle( "Add New SSAP Service" );

setDefaultCloseOperation( JFrame.HIDE_ON_CLOSE );
setSize( new Dimension( 500, 200 ) );
setVisible( true );
Expand Down Expand Up @@ -229,8 +248,7 @@ private void resetFields()
*/
private void setResource()
{
newResource = new SSAPRegResource(shortNameField.getText(), titleField.getText(), descriptionField.getText(), accessURLField.getText());

newResource = new SSAPRegResource(shortNameField.getText(), titleField.getText(), descriptionField.getText(), accessURLField.getText());
}

/**
Expand Down Expand Up @@ -273,7 +291,18 @@ public SSAPRegResource getResource()
{
return newResource;
}

public String getShortName()
{
return newResource.getShortName();
}
public String getAccessURL()
{
return newResource.getCapabilities()[0].getAccessUrl();
}
public String getDescription()
{
return newResource.getCapabilities()[0].getDescription();
}
/**
* Register new Property Change Listener
*/
Expand Down

0 comments on commit b9a9f30

Please sign in to comment.