List of utility methods to do JComponent Properties
boolean | isActive(JComponent c) is Active if (c == null) { return false; boolean active = true; if (c instanceof JInternalFrame) { active = ((JInternalFrame) c).isSelected(); if (active) { ... |
boolean | isComponentShowing(final JComponent component) A convenience method to centralise all isShowing() calls. if (component != null) { return (component.isShowing()); } else { return (false); |
boolean | isHorizontallyVisible(JComponent c, int from, int to) is Horizontally Visible Rectangle visible = c.getVisibleRect();
return visible.x <= from && visible.x + visible.width >= to;
|
boolean | isMandatory(JComponent comp) Returns if the component has been marked as mandatory. return Boolean.TRUE.equals(comp.getClientProperty(MANDATORY_KEY));
|
boolean | isMarker(JComponent component) is Marker return (component instanceof JLabel) && (MARKER_NAME.equals(component.getName())); |
boolean | isOver(JComponent c) is Over java.awt.Point p = MouseInfo.getPointerInfo().getLocation();
return (p.getX() > c.getX() && p.getY() > c.getY() && p.getX() < (c.getWidth() + c.getX())
&& p.getY() < (c.getHeight() + c.getY()));
|
boolean | isOverlapping(JComponent comp1, JComponent comp2) Utility method. return isOverlapping(comp1.getBounds(), comp2.getBounds());
|
boolean | isPasteEnabled(JComponent component) Returns whether the component can perform a paste operation. return getBooleanClientProperty(component, PASTE_CLIENT_PROPERTY);
|
boolean | isRectangularSelection(JComponent c) is Rectangular Selection return Boolean.TRUE.equals(c.getClientProperty(RECTANGULAR_SELECTION_PROPERTY));
|
boolean | isRequired(JComponent component) Determines if the supplied field is required. Boolean bool = (Boolean) component.getClientProperty(REQUIRED);
return bool != null ? bool.booleanValue() : false;
|