public ATable() { // fix for JTable bug - JTable consumes Esc key which is wrong // after JDK bug 4624483 is fixed this workaround can // be removed getActionMap().put("cancel", new OurCancelEditingAction()); // NOI18N }
public Dimension getPreferredScrollableViewportSize() { Dimension pref = super.getPreferredScrollableViewportSize(); if (this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF && getParent() != null) { Insets insets = getParent().getInsets(); Dimension size = getParent().getSize(); pref.height = size.height - insets.top - insets.bottom; } return pref; }
/** Try to revalidate once again because we want table to have * width that it asked for. */ public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) { return; } if (trytorevalidate && width != getPreferredScrollableViewportSize().width) { trytorevalidate = false; compoundScrollPane.validate(); trytorevalidate = true; } }
public boolean isEnabled() { return ATable.this.isEditing(); } }
/** Try to revalidate once again because we want table to have * width that it asked for. */ public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) { return; } if (trytorevalidate && width != getPreferredScrollableViewportSize().width) { trytorevalidate = false; compoundScrollPane.validate(); trytorevalidate = true; } }
/** Try to revalidate once again because we want table to have * width that it asked for. */ public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) { return; } if (trytorevalidate && (width != getPreferredScrollableViewportSize().width)) { trytorevalidate = false; compoundScrollPane.validate(); trytorevalidate = true; } }
public boolean isEnabled() { return ATable.this.isEditing(); } }
public ATable() { // fix for JTable bug - JTable consumes Esc key which is wrong // after JDK bug 4624483 is fixed this workaround can // be removed getActionMap().put("cancel", new OurCancelEditingAction()); // NOI18N }
/** Overriden to return table with controlled height * @param tm table model * @return table */ JTable createTable() { return new ATable(); }
public boolean isEnabled() { return ATable.this.isEditing(); } }
/** Overriden to return table with controlled height * @param tm table model * @return table */ JTable createTable() { return new ATable(); }
public Dimension getPreferredScrollableViewportSize() { Dimension pref = super.getPreferredScrollableViewportSize(); if (this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF && getParent() != null) { Insets insets = getParent().getInsets(); Dimension size = getParent().getSize(); pref.height = size.height - insets.top - insets.bottom; } return pref; }
public Dimension getPreferredScrollableViewportSize() { Dimension pref = super.getPreferredScrollableViewportSize(); if ((this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF) && (getParent() != null)) { Insets insets = getParent().getInsets(); Dimension size = getParent().getSize(); pref.height = size.height - insets.top - insets.bottom; } return pref; }
public ATable() { // fix for JTable bug - JTable consumes Esc key which is wrong // after JDK bug 4624483 is fixed this workaround can // be removed getActionMap().put("cancel", new OurCancelEditingAction()); // NOI18N }
/** Overriden to return table with controlled height * @param tm table model * @return table */ JTable createTable() { return new ATable(); }