protected void fillToolpane() {
super.fillToolpane();
JbsObjectToolPaneButton btnGoogleMaps = new JbsObjectToolPaneButton("globe.png", JbsL10N.getString("Address.showMap"), true);
btnGoogleMaps.setToolTipText(JbsL10N.getString("Address.showMapTooltip"));
btnGoogleMaps.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Address address = (Address) getSelectedJbsBaseObject();
JbsGoogleMapsWindow window = new JbsGoogleMapsWindow();
window.setAddress(address);
window.showForm();
}
});
this.getToolPane().addControl(JbsL10N.getString(PnListModule.TOOLPANEGROUP_ACTIONS), btnGoogleMaps);
JbsObjectToolPaneButton btnGoogleRoute = new JbsObjectToolPaneButton("globe.png", JbsL10N.getString("Address.showRoute"), true);
btnGoogleRoute.setToolTipText(JbsL10N.getString("Address.showRouteTooltip"));
btnGoogleRoute.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Address startAddress = new Address();
startAddress.setStreet(ClientGlobals.getCompany().getStreet());
startAddress.setZip(ClientGlobals.getCompany().getZip());
startAddress.setCity(ClientGlobals.getCompany().getCity());
Address endAddress = (Address) getSelectedJbsBaseObject();
JbsGoogleMapsWindow window = new JbsGoogleMapsWindow();
window.setRouteAddress(startAddress, endAddress);
window.showForm();
}
});
this.getToolPane().addControl(JbsL10N.getString(PnListModule.TOOLPANEGROUP_ACTIONS), btnGoogleRoute);
JbsObjectToolPaneButton btnGoogle = new JbsObjectToolPaneButton("globe.png", JbsL10N.getString("Address.showGooglePersonInfo"), true);
btnGoogle.setToolTipText(JbsL10N.getString("Address.showGooglePersonInfoTooltip"));
btnGoogle.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Address address = (Address) getSelectedJbsBaseObject();
JbsGoogleWindow window = new JbsGoogleWindow();
window.setPerson(address);
window.showForm();
}
});
this.getToolPane().addControl(JbsL10N.getString(PnListModule.TOOLPANEGROUP_ACTIONS), btnGoogle);
JbsObjectToolPaneButton btnMassLetters = new JbsObjectToolPaneButton("letter.png", JbsL10N.getString("Address.createMassLettersTitle"), false);
btnMassLetters.setToolTipText(JbsL10N.getString("Address.createMassLettersTooltip"));
btnMassLetters.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
printLetters();
}
});