private void btnDomainMenuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnDomainMenuMouseClicked pmDomain.show(tbMenu, (int) btnDomainMenu.getLocation().getX(), btnDomainMenu.getLocation().y + btnDomainMenu.getHeight()); }//GEN-LAST:event_btnDomainMenuMouseClicked
private void btnHostMenuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnHostMenuMouseClicked pmHostEnum.show(tbMenu, (int) btnHostMenu.getLocation().getX(), btnHostMenu.getLocation().y + btnHostMenu.getHeight()); }//GEN-LAST:event_btnHostMenuMouseClicked
private void btnGroupByMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnGroupByMouseClicked pmGroup.show(jPanel2, (int) btnGroupBy.getLocation().getX(), btnGroupBy.getLocation().y + btnGroupBy.getHeight()); }//GEN-LAST:event_btnGroupByMouseClicked
private void btnShowMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnShowMouseClicked pmHide.show(jPanel2, (int) btnShow.getLocation().getX(), btnShow.getLocation().y + btnShow.getHeight()); }//GEN-LAST:event_btnShowMouseClicked
@ScriptFunction(jsDoc = LEFT_JSDOC) @Override public int getLeft() { return super.getLocation().x; }
@ScriptFunction(jsDoc = TOP_JSDOC) @Override public int getTop() { return super.getLocation().y; }
//b1.setLocation(location,100); JButton button = (JButton)e.getSource(); button.setLocation(button.getLocation() + 10, 100);
private void btnCollectorsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCollectorsActionPerformed pmCollectors.removeAll(); for (JMenuItem mi : collectorPlugins.getPlugins()) { mi.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent evt) { pluginMenuEvent(evt); } }); pmCollectors.add(mi); } pmCollectors.show(tbMenu, (int) btnCollectors.getLocation().getX(), btnCollectors.getLocation().y + btnCollectors.getHeight()); }//GEN-LAST:event_btnCollectorsActionPerformed
public void actionPerformed(ActionEvent e) { if (!isHelpWindowOpen) { isHelpWindowOpen = true; helpWindow = new JFrame("Help: " + chkEnabled.getText() + " Effect"); JTextArea helpTextArea = new JTextArea(data.getHelpText()); helpTextArea.setEditable(false); helpWindow.getContentPane().add(helpTextArea, BorderLayout.WEST); helpWindow.pack(); helpWindow.setLocation(btnHelp.getLocation().x, btnHelp.getLocation().y); helpWindow.setVisible(true); helpWindow.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(WindowEvent winEvt) { // Perhaps ask user if they want to save any unsaved files first. isHelpWindowOpen = false; } }); } else { if (helpWindow != null) helpWindow.requestFocus(); } } });
@Override public void actionPerformed(ActionEvent e) { parent.showContextMenu( SwingUtilities.convertPoint(cell, cell.settingsButton.getLocation(), parent.scrollPane)); } });
void adjustDimension(JButton component) { FontMetrics metrics = component.getFontMetrics(component.getFont()); int width = metrics.stringWidth(component.getText()); component.setPreferredSize(new Dimension(width + 32, controlHeight)); component.setBounds(new Rectangle(component.getLocation(), component.getPreferredSize())); }
e1.printStackTrace(); toolTip.setBounds(b.getLocation().x+b.getWidth(), b.getLocation().y-b.getHeight(), 100, 50); f.add(toolTip); f.repaint();
HeadlessAutoSaveType.AFTER_NON_COMBAT_MOVE)); menu.add(clientModelForHostBots.getHostBotGetGameSaveClientAction(GameSelectorPanel.this)); final Point point = loadSavedGame.getLocation(); menu.show(GameSelectorPanel.this, point.x + loadSavedGame.getWidth(), point.y);
final EffectBuilder eb = new EffectBuilder(); eb.pack(); final Point location = addEffectButton.getLocation(); SwingUtilities.convertPointToScreen(location, addEffectButton); eb.setLocation(location);