public void doLayout() { if (comp != null) { comp.setBounds(0,0, getWidth()-PropUtils.getCustomButtonWidth(), getHeight()); comp.doLayout(); } button.setBounds(getWidth()-PropUtils.getCustomButtonWidth(), 0, PropUtils.getCustomButtonWidth(), getHeight()); if (log) { PropUtils.log (ButtonPanel.class, "Laying out button panel. Bounds" + " are " + getBounds() + ", custom editor button bounds: " + button.getBounds() + " comp is " + comp); //NOI18N } needLayout=false; }
public void doLayout() { if (comp != null) { comp.setBounds(0,0, getWidth()-PropUtils.getCustomButtonWidth(), getHeight()); comp.doLayout(); } button.setBounds(getWidth()-PropUtils.getCustomButtonWidth(), 0, PropUtils.getCustomButtonWidth(), getHeight()); if (log) { PropUtils.log (ButtonPanel.class, "Laying out button panel. Bounds" + " are " + getBounds() + ", custom editor button bounds: " + button.getBounds() + " comp is " + comp); //NOI18N } needLayout=false; }
public void doLayout() { if (comp != null) { comp.setBounds(0, 0, getWidth() - PropUtils.getCustomButtonWidth(), getHeight()); comp.doLayout(); } button.setBounds( getWidth() - PropUtils.getCustomButtonWidth(), 0, PropUtils.getCustomButtonWidth(), getHeight() ); if (log) { PropUtils.log( ButtonPanel.class, "Laying out button panel. Bounds" + " are " + getBounds() + ", custom editor button bounds: " + button.getBounds() + " comp is " + comp ); //NOI18N } needLayout = false; }
success = e.getX() > (getWidth() - PropUtils.getCustomButtonWidth());
success = e.getX() > getWidth() - PropUtils.getCustomButtonWidth();
success = e.getX() > getWidth() - PropUtils.getCustomButtonWidth();
private void createButton() { button = new ConditionallyFocusableButton(); int buttonWidth = PropUtils.getCustomButtonWidth(); button.setBounds (getWidth() - buttonWidth, 0, buttonWidth, getHeight()); button.setIcon (PropUtils.getCustomButtonIcon()); button.setRolloverIcon(PropUtils.getCustomButtonIcon()); button.setMargin (null); button.setName ("Custom editor button - editor instance");//NOI18N button.setText(null); //undocumented (?) call to hide action text - see JButton line 234 button.putClientProperty ("hideActionText", Boolean.TRUE); //NOI18N //Don't allow button to receive focus - otherwise it can when it's //removed // button.setFocusable(false); add (button); //setFocusable(false); }
private void createButton() { button = new ConditionallyFocusableButton(); int buttonWidth = PropUtils.getCustomButtonWidth(); button.setBounds(getWidth() - buttonWidth, 0, buttonWidth, getHeight()); button.setIcon(PropUtils.getCustomButtonIcon()); button.setRolloverIcon(PropUtils.getCustomButtonIcon()); button.setMargin(null); button.setName("Custom editor button - editor instance"); //NOI18N button.setText(null); //undocumented (?) call to hide action text - see JButton line 234 button.putClientProperty("hideActionText", Boolean.TRUE); //NOI18N //Don't allow button to receive focus - otherwise it can when it's //removed // button.setFocusable(false); add(button); //setFocusable(false); }
private void createButton() { button = new ConditionallyFocusableButton(); int buttonWidth = PropUtils.getCustomButtonWidth(); button.setBounds (getWidth() - buttonWidth, 0, buttonWidth, getHeight()); button.setIcon (PropUtils.getCustomButtonIcon()); button.setRolloverIcon(PropUtils.getCustomButtonIcon()); button.setMargin (null); button.setName ("Custom editor button - editor instance");//NOI18N button.setText(null); //undocumented (?) call to hide action text - see JButton line 234 button.putClientProperty ("hideActionText", Boolean.TRUE); //NOI18N //Don't allow button to receive focus - otherwise it can when it's //removed // button.setFocusable(false); add (button); //setFocusable(false); }
public void setRolloverPoint(Point p) { if (p != null) { if (p.x < (getWidth() - PropUtils.getCustomButtonWidth())) { button.getModel().setRollover(false); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(true); } } else { button.getModel().setRollover(true); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(false); } } } else { button.getModel().setRollover(false); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(false); } } }
public void setRolloverPoint(Point p) { if (p != null) { if (p.x < getWidth() - PropUtils.getCustomButtonWidth()) { button.getModel().setRollover(false); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(true); } } else { button.getModel().setRollover(true); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(false); } } } else { button.getModel().setRollover(false); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(false); } } }
public void setRolloverPoint(Point p) { if (p != null) { if (p.x < getWidth() - PropUtils.getCustomButtonWidth()) { button.getModel().setRollover(false); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(true); } } else { button.getModel().setRollover(true); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(false); } } } else { button.getModel().setRollover(false); if (comp instanceof AbstractButton) { ((AbstractButton) comp).getModel().setRollover(false); } } }