/** * Computes the size constraints of the information control in points. * * @param subjectControl the subject control * @param subjectArea the subject area * @param informationControl the information control whose size constraints are computed * @return the computed size constraints in points * @since 3.0 */ protected Point computeSizeConstraints(Control subjectControl, Rectangle subjectArea, IInformationControl informationControl) { return computeSizeConstraints(subjectControl, informationControl); }
/** * Computes the size constraints of the information control in points. * * @param subjectControl the subject control * @param subjectArea the subject area * @param informationControl the information control whose size constraints are computed * @return the computed size constraints in points * @since 3.0 */ protected Point computeSizeConstraints(Control subjectControl, Rectangle subjectArea, IInformationControl informationControl) { return computeSizeConstraints(subjectControl, informationControl); }
@Override protected Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl) { // at least as big as the proposal table Point sizeConstraint= super.computeSizeConstraints(subjectControl, informationControl); Point size= subjectControl.getSize(); if (sizeConstraint.x < size.x) sizeConstraint.x= size.x; if (sizeConstraint.y < size.y) sizeConstraint.y= size.y; return sizeConstraint; } }
@Override protected Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl) { // at least as big as the proposal table Point sizeConstraint= super.computeSizeConstraints(subjectControl, informationControl); Point size= subjectControl.getSize(); if (sizeConstraint.x < size.x) sizeConstraint.x= size.x; if (sizeConstraint.y < size.y) sizeConstraint.y= size.y; return sizeConstraint; } }
@Override protected Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl) { // at least as big as the proposal table Point sizeConstraint= super.computeSizeConstraints(subjectControl, informationControl); Point size= subjectControl.getShell().getSize(); // AbstractInformationControlManager#internalShowInformationControl(Rectangle, Object) adds trims // to the computed constraints. Need to remove them here, to make the outer bounds of the additional // info shell fit the bounds of the proposal shell: if (fInformationControl instanceof IInformationControlExtension3) { Rectangle shellTrim= ((IInformationControlExtension3) fInformationControl).computeTrim(); size.x -= shellTrim.width; size.y -= shellTrim.height; } if (sizeConstraint.x < size.x) sizeConstraint.x= size.x; if (sizeConstraint.y < size.y) sizeConstraint.y= size.y; return sizeConstraint; }
@Override protected Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl) { // at least as big as the proposal table Point sizeConstraint= super.computeSizeConstraints(subjectControl, informationControl); Point size= subjectControl.getShell().getSize(); // AbstractInformationControlManager#internalShowInformationControl(Rectangle, Object) adds trims // to the computed constraints. Need to remove them here, to make the outer bounds of the additional // info shell fit the bounds of the proposal shell: if (fInformationControl instanceof IInformationControlExtension3) { Rectangle shellTrim= ((IInformationControlExtension3) fInformationControl).computeTrim(); size.x -= shellTrim.width; size.y -= shellTrim.height; } if (sizeConstraint.x < size.x) sizeConstraint.x= size.x; if (sizeConstraint.y < size.y) sizeConstraint.y= size.y; return sizeConstraint; }
if (informationControl != null) { Point sizeConstraints= computeSizeConstraints(fSubjectControl, fSubjectArea, informationControl); if (informationControl instanceof IInformationControlExtension3) { IInformationControlExtension3 iControl3= (IInformationControlExtension3) informationControl;
if (informationControl != null) { Point sizeConstraints= computeSizeConstraints(fSubjectControl, fSubjectArea, informationControl); if (informationControl instanceof IInformationControlExtension3) { IInformationControlExtension3 iControl3= (IInformationControlExtension3) informationControl;