Revision 2985 trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/ui/SearchPanel.java
SearchPanel.java | ||
---|---|---|
57 | 57 |
/** |
58 | 58 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
59 | 59 |
*/ |
60 |
public class SearchPanel extends JPanel {
|
|
60 |
public class SearchPanel extends AbstractSearchPanel{
|
|
61 | 61 |
private JTextField tituloText = null; |
62 | 62 |
private JPanel panelBotones = null; |
63 | 63 |
private JRadioButton exactaButton = null; |
... | ... | |
919 | 919 |
return claveText; |
920 | 920 |
} |
921 | 921 |
|
922 |
public String getTitulo() { |
|
922 |
/** |
|
923 |
* This method initializes jComboBox |
|
924 |
* |
|
925 |
* @return javax.swing.JComboBox |
|
926 |
*/ |
|
927 |
private JComboBox getCoordenadasCombo() { |
|
928 |
if (coordenadasCombo == null) { |
|
929 |
String[] coordenadas = { |
|
930 |
"igual", "contiene", "incluye", "est? totalmente fuera de" |
|
931 |
}; |
|
932 |
coordenadasCombo = new JComboBox(coordenadas); |
|
933 |
coordenadasCombo.setPreferredSize(new java.awt.Dimension(300, 25)); |
|
934 |
} |
|
935 |
|
|
936 |
return coordenadasCombo; |
|
937 |
} |
|
938 |
|
|
939 |
/** |
|
940 |
* This method initializes jPanel4 |
|
941 |
* |
|
942 |
* @return javax.swing.JPanel |
|
943 |
*/ |
|
944 |
private JPanel getJPanel4() { |
|
945 |
if (jPanel4 == null) { |
|
946 |
jPanel4 = new JPanel(); |
|
947 |
jPanel4.setLayout(new BoxLayout(jPanel4, BoxLayout.Y_AXIS)); |
|
948 |
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder( |
|
949 |
null, "Coordenadas", |
|
950 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
951 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
952 |
jPanel4.setPreferredSize(new java.awt.Dimension(315, 240)); |
|
953 |
jPanel4.add(getPanelSuperiores(), null); |
|
954 |
jPanel4.add(getPanelInferiores(), null); |
|
955 |
jPanel4.add(getJPanel(), null); |
|
956 |
} |
|
957 |
|
|
958 |
return jPanel4; |
|
959 |
} |
|
960 |
|
|
961 |
/** |
|
962 |
* This method initializes jPanel5 |
|
963 |
* |
|
964 |
* @return javax.swing.JPanel |
|
965 |
*/ |
|
966 |
private JPanel getComponentesPanel() { |
|
967 |
if (componentesPanel == null) { |
|
968 |
componentesPanel = new JPanel(); |
|
969 |
componentesPanel.setPreferredSize(new java.awt.Dimension(665, 435)); |
|
970 |
componentesPanel.add(getJPanel33(), null); |
|
971 |
componentesPanel.add(getJPanel3(), null); |
|
972 |
} |
|
973 |
|
|
974 |
return componentesPanel; |
|
975 |
} |
|
976 |
|
|
977 |
/* (non-Javadoc) |
|
978 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getTitle() |
|
979 |
*/ |
|
980 |
public String getTitle() { |
|
923 | 981 |
if (getTituloText().getText().equals("")) { |
924 | 982 |
return null; |
925 | 983 |
} |
... | ... | |
927 | 985 |
return getTituloText().getText(); |
928 | 986 |
} |
929 | 987 |
|
930 |
public String getConcordancia() { |
|
988 |
/* (non-Javadoc) |
|
989 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getTitleOption() |
|
990 |
*/ |
|
991 |
public String getTitleOption() { |
|
931 | 992 |
if (getExactaButton().isSelected()) { |
932 | 993 |
return "E"; |
933 | 994 |
} |
... | ... | |
943 | 1004 |
return null; |
944 | 1005 |
} |
945 | 1006 |
|
946 |
public String getResumen() { |
|
1007 |
/* (non-Javadoc) |
|
1008 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getAbstract() |
|
1009 |
*/ |
|
1010 |
public String getAbstract() { |
|
947 | 1011 |
if (getResumenText().getText().equals("")) { |
948 | 1012 |
return null; |
949 | 1013 |
} |
... | ... | |
951 | 1015 |
return getResumenText().getText(); |
952 | 1016 |
} |
953 | 1017 |
|
954 |
public String getClave() { |
|
1018 |
/* (non-Javadoc) |
|
1019 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getKeys() |
|
1020 |
*/ |
|
1021 |
public String getKeys() { |
|
955 | 1022 |
if (getClaveText().getText().equals("")) { |
956 | 1023 |
return null; |
957 | 1024 |
} |
... | ... | |
959 | 1026 |
return getClaveText().getText(); |
960 | 1027 |
} |
961 | 1028 |
|
962 |
public String getCategoria() { |
|
1029 |
/* (non-Javadoc) |
|
1030 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getCathegory() |
|
1031 |
*/ |
|
1032 |
public String getCathegory() { |
|
963 | 1033 |
return (String) getCategoriaCombo().getSelectedItem(); |
964 | 1034 |
} |
965 | 1035 |
|
966 |
public String getEscala() { |
|
1036 |
/* (non-Javadoc) |
|
1037 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getScale() |
|
1038 |
*/ |
|
1039 |
public String getScale() { |
|
967 | 1040 |
return (String) getEscalaCombo().getSelectedItem(); |
968 | 1041 |
} |
969 | 1042 |
|
970 |
public String getProveedor() { |
|
971 |
if (getProveedorText().getText().equals("")) { |
|
1043 |
/* (non-Javadoc) |
|
1044 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getDateTo() |
|
1045 |
*/ |
|
1046 |
public String getDateTo() { |
|
1047 |
if (getAText().getText().equals("")) { |
|
972 | 1048 |
return null; |
973 | 1049 |
} |
974 | 1050 |
|
975 |
return getProveedorText().getText();
|
|
1051 |
return getAText().getText();
|
|
976 | 1052 |
} |
977 | 1053 |
|
978 |
public String getFechaDe() { |
|
1054 |
/* (non-Javadoc) |
|
1055 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getDateFrom() |
|
1056 |
*/ |
|
1057 |
public String getDateFrom() { |
|
979 | 1058 |
if (getDeText().getText().equals("")) { |
980 | 1059 |
return null; |
981 | 1060 |
} |
... | ... | |
983 | 1062 |
return getDeText().getText(); |
984 | 1063 |
} |
985 | 1064 |
|
986 |
public String getFechaA() { |
|
987 |
if (getAText().getText().equals("")) { |
|
988 |
return null; |
|
989 |
} |
|
990 |
|
|
991 |
return getAText().getText(); |
|
992 |
} |
|
993 |
|
|
994 |
public Coordinates getCoordenadas() { |
|
1065 |
/* (non-Javadoc) |
|
1066 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getCoordinates() |
|
1067 |
*/ |
|
1068 |
public Coordinates getCoordinates() { |
|
995 | 1069 |
return new Coordinates(getULXText().getText(), getULYText().getText(), |
996 |
getBRXText().getText(), getBRYText().getText()); |
|
1070 |
getBRXText().getText(), getBRYText().getText());
|
|
997 | 1071 |
} |
998 | 1072 |
|
999 |
public String getCoordenadasOpcion() { |
|
1073 |
/* (non-Javadoc) |
|
1074 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getCoordinatesOption() |
|
1075 |
*/ |
|
1076 |
public String getCoordinatesOption() { |
|
1000 | 1077 |
return (String) getCoordenadasCombo().getSelectedItem(); |
1001 | 1078 |
} |
1002 | 1079 |
|
1003 |
/** |
|
1004 |
* This method initializes jComboBox |
|
1005 |
* |
|
1006 |
* @return javax.swing.JComboBox |
|
1080 |
/* (non-Javadoc) |
|
1081 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getProvider() |
|
1007 | 1082 |
*/ |
1008 |
private JComboBox getCoordenadasCombo() { |
|
1009 |
if (coordenadasCombo == null) { |
|
1010 |
String[] coordenadas = { |
|
1011 |
"igual", "contiene", "incluye", "est? totalmente fuera de" |
|
1012 |
}; |
|
1013 |
coordenadasCombo = new JComboBox(coordenadas); |
|
1014 |
coordenadasCombo.setPreferredSize(new java.awt.Dimension(300, 25)); |
|
1083 |
public String getProvider() { |
|
1084 |
if (getProveedorText().getText().equals("")) { |
|
1085 |
return null; |
|
1015 | 1086 |
} |
1016 | 1087 |
|
1017 |
return coordenadasCombo;
|
|
1088 |
return getProveedorText().getText();
|
|
1018 | 1089 |
} |
1019 | 1090 |
|
1020 |
/** |
|
1021 |
* This method initializes jPanel4 |
|
1022 |
* |
|
1023 |
* @return javax.swing.JPanel |
|
1091 |
/* (non-Javadoc) |
|
1092 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#getRestrictAreaClicked() |
|
1024 | 1093 |
*/ |
1025 |
private JPanel getJPanel4() { |
|
1026 |
if (jPanel4 == null) { |
|
1027 |
jPanel4 = new JPanel(); |
|
1028 |
jPanel4.setLayout(new BoxLayout(jPanel4, BoxLayout.Y_AXIS)); |
|
1029 |
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder( |
|
1030 |
null, "Coordenadas", |
|
1031 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
1032 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
1033 |
jPanel4.setPreferredSize(new java.awt.Dimension(315, 240)); |
|
1034 |
jPanel4.add(getPanelSuperiores(), null); |
|
1035 |
jPanel4.add(getPanelInferiores(), null); |
|
1036 |
jPanel4.add(getJPanel(), null); |
|
1037 |
} |
|
1038 |
|
|
1039 |
return jPanel4; |
|
1094 |
public boolean getRestrictAreaClicked() { |
|
1095 |
// TODO Auto-generated method stub |
|
1096 |
return false; |
|
1040 | 1097 |
} |
1041 | 1098 |
|
1042 |
/** |
|
1043 |
* This method initializes jPanel5 |
|
1044 |
* |
|
1045 |
* @return javax.swing.JPanel |
|
1099 |
/* (non-Javadoc) |
|
1100 |
* @see es.gva.cit.catalogClient.ui.ISearchPanel#setTitle(java.lang.String) |
|
1046 | 1101 |
*/ |
1047 |
private JPanel getComponentesPanel() { |
|
1048 |
if (componentesPanel == null) { |
|
1049 |
componentesPanel = new JPanel(); |
|
1050 |
componentesPanel.setPreferredSize(new java.awt.Dimension(665, 435)); |
|
1051 |
componentesPanel.add(getJPanel33(), null); |
|
1052 |
componentesPanel.add(getJPanel3(), null); |
|
1053 |
} |
|
1102 |
public void setTitle(String title) { |
|
1103 |
getTituloText().setText(title); |
|
1104 |
|
|
1105 |
} |
|
1054 | 1106 |
|
1055 |
return componentesPanel; |
|
1056 |
} |
|
1107 |
|
|
1057 | 1108 |
} // @jve:decl-index=0:visual-constraint="10,10" |
Also available in: Unified diff