/** * Set the height in percent relative to the parent object * * @param nHeight * The height in percent. Should be between 0 and 100 * @return this */ @Nonnull public final HCSWFObject setHeightPerc (final int nHeight) { m_sHeight = ECSSUnit.perc (nHeight); return this; }
/** * Set the width in percent relative to the parent object * * @param nWidth * The width in percent. Should be between 0 and 100 * @return this */ @Nonnull public final HCSWFObject setWidthPerc (final int nWidth) { m_sWidth = ECSSUnit.perc (nWidth); return this; }
@Nonnull public final THISTYPE setWidthPercentage (final double dPercentage) { m_sWidth = ECSSUnit.perc (dPercentage); return thisAsT (); }
@Nonnull public final THISTYPE setHeightPercentage (final double dPercentage) { m_sHeight = ECSSUnit.perc (dPercentage); return thisAsT (); }
/** * Set the width in percent. * * @param dPerc * percentage width. * @return this */ @Nonnull default IMPLTYPE setWidthPerc (@Nonnegative final double dPerc) { return setWidth (ECSSUnit.perc (dPerc)); }
/** * Create a new column with a certain percentage. * * @param nPerc * The percentage to be used. Should ideally be between 0 and 100. * @return Never <code>null</code>. */ @Nonnull public static HCCol perc (@Nonnegative final int nPerc) { return new HCCol ().setWidth (ECSSUnit.perc (nPerc)); }
public void onInternalError (@Nullable final Throwable t, @Nonnull final String sErrorID, @Nonnull final Locale aDisplayLocale) { m_aParentNode.addChild (new HCH1 ().addChild (EPhotonCoreText.INTERNAL_ERROR_TITLE.getDisplayText (aDisplayLocale))); m_aParentNode.addChild (new HCDiv ().addChildren (HCExtHelper.nl2brList (EPhotonCoreText.INTERNAL_ERROR_DESCRIPTION.getDisplayTextWithArgs (aDisplayLocale, sErrorID)))); // Show stack trace details if (GlobalDebug.isDebugMode () && t != null) { // Get error stack trace final String sStackTrace = StackTraceHelper.getStackAsString (t, false); final HCTextArea aStackTrace = new HCTextArea ("callstack").setValue (sStackTrace) .setRows (20) .addStyle (CCSSProperties.WIDTH.newValue (ECSSUnit.perc (98))) .addStyle (CCSSProperties.FONT_SIZE.newValue (ECSSUnit.pt (10))) .addStyle (CCSSProperties.FONT_FAMILY.newValue (CCSSValue.FONT_MONOSPACE)); m_aParentNode.addChild (aStackTrace); } } }