use of eu.ggnet.dwoss.util.HtmlDialog in project dwoss by gg-net.
the class DossierTableView method buildDossierPopup.
private JPopupMenu buildDossierPopup() {
JPopupMenu menu = new JPopupMenu();
JMenuItem detailsItem = new JMenuItem(new AbstractAction("Details") {
@Override
public void actionPerformed(ActionEvent e) {
Dossier dos = model.getDossier(table.convertRowIndexToModel(table.getSelectedRow()));
new HtmlDialog(SwingUtilities.getWindowAncestor(DossierTableView.this), Dialog.ModalityType.MODELESS).setText(LegacyBridgeUtil.toHtmlDetailed(dos)).setVisible(true);
}
});
detailsItem.setText("Details");
JMenuItem historyItem = new JMenuItem(new AbstractAction("Verlauf") {
@Override
public void actionPerformed(ActionEvent e) {
HtmlDialog dialog = new HtmlDialog(SwingUtilities.getWindowAncestor(DossierTableView.this), ModalityType.MODELESS);
dialog.setText(DossierFormater.toHtmlHistory(model.getDossier(table.convertRowIndexToModel(table.getSelectedRow()))));
dialog.setVisible(true);
}
});
historyItem.setText("Verlauf");
menu.add(detailsItem);
menu.add(historyItem);
return menu;
}
use of eu.ggnet.dwoss.util.HtmlDialog in project dwoss by gg-net.
the class DossierTableView method helpButtonActionPerformed.
// GEN-LAST:event_tableKeyReleased
private void helpButtonActionPerformed(java.awt.event.ActionEvent evt) {
// GEN-FIRST:event_helpButtonActionPerformed
if (controller == null)
return;
HtmlDialog dialog = new HtmlDialog();
dialog.setText(controller.generateHelp());
dialog.setVisible(true);
}
use of eu.ggnet.dwoss.util.HtmlDialog in project dwoss by gg-net.
the class SalesProductChooserCask method productTableMouseClicked.
// </editor-fold>//GEN-END:initComponents
private void productTableMouseClicked(java.awt.event.MouseEvent evt) {
// GEN-FIRST:event_productTableMouseClicked
String s = (String) productTable.getValueAt(productTable.getSelectedRow(), 0);
for (SalesProduct p : products) {
if (p.getPartNo().equals(s))
product = p;
}
if (evt.getClickCount() > 1) {
HtmlDialog dialog = new HtmlDialog(SwingUtilities.getWindowAncestor(this), Dialog.ModalityType.MODELESS);
dialog.setText(product.toHtml());
dialog.setVisible(true);
}
}
use of eu.ggnet.dwoss.util.HtmlDialog in project dwoss by gg-net.
the class DossierTableView method tableMouseClicked.
// </editor-fold>//GEN-END:initComponents
private void tableMouseClicked(java.awt.event.MouseEvent evt) {
// GEN-FIRST:event_tableMouseClicked
if (model == null || controller == null)
return;
int row = table.rowAtPoint(evt.getPoint());
table.setRowSelectionInterval(row, row);
Dossier selectedDos = model.getDossier(table.convertRowIndexToModel(table.getSelectedRow()));
controller.selectionChanged(selectedDos);
if (evt.getClickCount() == 2 && table.getSelectedRow() != -1 && model != null) {
Dossier dos = model.getDossier(table.convertRowIndexToModel(table.getSelectedRow()));
new HtmlDialog(SwingUtilities.getWindowAncestor(this), Dialog.ModalityType.MODELESS).setText(LegacyBridgeUtil.toHtmlDetailed(dos)).setVisible(true);
}
if (SwingUtilities.isRightMouseButton(evt)) {
dossierPopup.show(evt.getComponent(), evt.getX(), evt.getY());
}
}
Aggregations