/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright(c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*
* Search help titles
*/
controller = ctrl;
// build subpanels
queryPanel = new pmHelpIndexQueryPanel(this);
resultPanel = new pmHelpIndexResultPanel(this);
// lay out top panel
this.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.gridx = 0;
c.gridy = 0;
c.weightx = 1.0;
c.weighty = 0.0;
p.setLayout(new GridBagLayout());
// pc.fill = GridBagConstraints.HORIZONTAL;
// p.add(textPanels[2]);
this.add(p, c);
p = new JPanel();
p.setLayout(new BorderLayout());
c.gridheight = 0;
c.weighty = 1.0;
c.weightx = 0.0;
this.add(p, c);
// figure out when we are un-tabbed
public void stateChanged(ChangeEvent e) {
if (!(tp.getSelectedComponent() instanceof
/*
* controller.frame.getRootPane().
* setDefaultButton(
* controller.frame.dismiss);
*/
} else {
// allow tab to retain focus
// queryPanel.query.requestFocus();
}
}
});
}
// place item titles in search result panel
resultPanel.setListEmpty(true);
} else {
while (e.hasMoreElements()) {
v.addElement(i);
}
resultPanel.setListEmpty(false);
}
}
}
protected boolean listEmpty = true;
parentPanel = p;
this.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.gridx = 0;
c.gridy = 0;
/*
* MNEMONIC
* promptLabel.setDisplayedMnemonic(
* pmUtility.getIntResource("Matching.entries:.mnemonic"));
*/
this.add(promptLabel, c);
c.gridy = 1;
selectButton = new pmButton(
selectButton.setEnabled(false);
this.add(selectButton, c);
public void actionPerformed(ActionEvent e) {
}
});
try {
// resultItems = pmHelpIndexQueryPanel.helpDB.getPartialMatch("");
} catch (pmHelpException x) {
resultItems = new Vector();
}
public void valueChanged(ListSelectionEvent e) {
if (!listEmpty) {
selectButton.setEnabled(true);
/*
* parentPanel.controller.frame.
* getRootPane().setDefaultButton(selectButton);
*/
}
}});
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
int i = l.locationToIndex(e.getPoint());
if (!listEmpty && i >= 0) {
}
}
}
});
c.gridx = 1;
c.gridy = 0;
this.add(scrollPane, c);
}
}
void setListEmpty(boolean e) {
listEmpty = e;
selectButton.setEnabled(false);
/*
* parentPanel.controller.frame.getRootPane().
* setDefaultButton(parentPanel.controller.frame.dismiss);
*/
}
}
parentPanel = p;
this.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.gridx = 0;
c.gridy = 0;
c.gridwidth = 1;
c.gridheight = 1;
/*
* MNEMONIC
* promptLabel.setDisplayedMnemonic(
* pmUtility.getIntResource("Search.help.index.for:.mnemonic"));
*/
this.add(promptLabel, c);
query = new JTextField();
query.setEditable(true);
public void actionPerformed(ActionEvent e) {
}
});
c.gridx = 1;
c.weightx = 1.0;
DocumentListener d = new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
// ignore
}
public void insertUpdate(DocumentEvent e) {
}
public void removeUpdate(DocumentEvent e) {
}
};
}
try {
// v = helpDB.getPartialMatch(txt);
} catch (pmHelpException x) {
}
}
// belongs in controller?
// static pmHelpRepository helpDB = new pmHelpRepository();
}