Revision 10718 branches/piloto3d/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/gazetteer/gui/SearchDialog.java
SearchDialog.java | ||
---|---|---|
70 | 70 |
*/ |
71 | 71 |
public class SearchDialog extends SearchDialogPanel |
72 | 72 |
implements IWindow,ViewPortListener{ |
73 |
private JDialog frame = null;
|
|
74 |
|
|
75 |
public SearchDialog(GazetteerClient client,JDialog frame, Object serverConnectFrame){
|
|
73 |
public WindowInfo m_windowInfo = null;
|
|
74 |
|
|
75 |
public SearchDialog(GazetteerClient client,Object serverConnectFrame){ |
|
76 | 76 |
super(client,serverConnectFrame); |
77 |
this.frame = frame; |
|
77 |
|
|
78 | 78 |
setViewChangeListener(); |
79 | 79 |
loadViewPortCoordinates(); |
80 | 80 |
} |
... | ... | |
83 | 83 |
* @see com.iver.andami.ui.mdiManager.View#getViewInfo() |
84 | 84 |
*/ |
85 | 85 |
public WindowInfo getWindowInfo() { |
86 |
WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG); |
|
87 |
m_viewinfo.setTitle(Messages.getText( "gazetteer_search")); |
|
88 |
return m_viewinfo; |
|
86 |
if (m_windowInfo == null){ |
|
87 |
m_windowInfo = new WindowInfo(WindowInfo.PALETTE); |
|
88 |
m_windowInfo.setTitle(Messages.getText("gazetteer_search") + " [" + |
|
89 |
getCurrentServer() + "]"); |
|
90 |
m_windowInfo.setHeight(80); |
|
91 |
m_windowInfo.setWidth(525); |
|
92 |
} |
|
93 |
return m_windowInfo; |
|
94 |
|
|
89 | 95 |
} |
90 | 96 |
|
91 | 97 |
public void ShowResultsActionPerformed(Feature[] features) { |
92 |
JDialog panel = new JDialog((Frame) PluginServices.getMainFrame(), false); |
|
93 |
Frames.centerFrame(panel,420,258); |
|
94 |
panel.setTitle(Messages.getText( "gazetteer_search")); |
|
95 |
panel.setResizable(false); |
|
96 |
|
|
97 |
ShowResultsDialog dialog = new ShowResultsDialog(panel, |
|
98 |
client, |
|
99 |
features, |
|
100 |
lowerPanel.getNPaginas(), |
|
101 |
getQuery()); |
|
102 |
|
|
103 |
panel.getContentPane().add(dialog); |
|
104 |
panel.show(); |
|
105 |
|
|
106 |
//PluginServices.getMDIManager().addView(panel); |
|
107 |
} |
|
98 |
JDialog panel = new JDialog((Frame) PluginServices.getMainFrame(), false); |
|
99 |
Frames.centerFrame(panel,420,258); |
|
100 |
panel.setTitle(Messages.getText( "gazetteer_search")); |
|
101 |
panel.setResizable(false); |
|
102 |
|
|
103 |
ShowResultsDialog dialog = new ShowResultsDialog(panel, |
|
104 |
client, |
|
105 |
features, |
|
106 |
lowerPanel.getNPaginas(), |
|
107 |
getQuery()); |
|
108 |
|
|
109 |
panel.getContentPane().add(dialog); |
|
110 |
panel.show(); |
|
111 |
} |
|
108 | 112 |
|
109 | 113 |
public void closeButtonActionPerformed() { |
110 |
frame.setVisible(false);
|
|
114 |
closeJDialog();
|
|
111 | 115 |
} |
112 | 116 |
|
113 | 117 |
/** |
... | ... | |
115 | 119 |
*/ |
116 | 120 |
public void sizeButtonActionPerformed(){ |
117 | 121 |
if (isMinimized){ |
118 |
frame.setSize(525,520); |
|
119 |
ppalPanel.setPreferredSize(new Dimension(514,490)); |
|
122 |
getWindowInfo().setHeight(523); |
|
123 |
getWindowInfo().setWidth(525); |
|
124 |
ppalPanel.setPreferredSize(new Dimension(514,490)); |
|
120 | 125 |
getLowerPanel().setPreferredSize(new Dimension(514,440)); |
121 | 126 |
getLowerPanel().setVisible(true); |
122 |
frame.setVisible(true); |
|
123 | 127 |
getUpperPanel().setUpIcon(); |
124 | 128 |
}else{ |
125 |
frame.setSize(525,117);
|
|
126 |
ppalPanel.setPreferredSize(new Dimension(514,91));
|
|
127 |
getLowerPanel().setPreferredSize(new Dimension(514,0));
|
|
128 |
getLowerPanel().setVisible(false);
|
|
129 |
frame.setVisible(true);
|
|
130 |
getUpperPanel().setDownIcon();
|
|
129 |
getWindowInfo().setHeight(120);
|
|
130 |
getWindowInfo().setWidth(525);
|
|
131 |
ppalPanel.setPreferredSize(new Dimension(514,91));
|
|
132 |
getLowerPanel().setPreferredSize(new Dimension(514,0));
|
|
133 |
getLowerPanel().setVisible(false);
|
|
134 |
getUpperPanel().setDownIcon();
|
|
131 | 135 |
} |
132 | 136 |
isMinimized = !isMinimized; |
133 | 137 |
} |
... | ... | |
143 | 147 |
} |
144 | 148 |
|
145 | 149 |
public void closeJDialog() { |
146 |
frame.setVisible(false);
|
|
150 |
PluginServices.getMDIManager().closeWindow(this);
|
|
147 | 151 |
} |
148 | 152 |
|
149 | 153 |
/** |
Also available in: Unified diff