code: private DialogBaseUnits getDialogBaseUnits(Component c) {
          FormUtils.ensureValidCache();
          if (c == null) { // || (font = c.getFont()) == null) {
              // logInfo("Missing font metrics: " + c);
              return getGlobalDialogBaseUnits();
          }
          FontMetrics fm = c.getFontMetrics(getDefaultDialogFont());
          if (fm.equals(cachedFontMetrics)) {
              return cachedDialogBaseUnits;
          }
          DialogBaseUnits dialogBaseUnits = computeDialogBaseUnits(fm);
          cachedFontMetrics = fm;
          cachedDialogBaseUnits = dialogBaseUnits;
          return dialogBaseUnits;
      }
docs: Looks up and returns the dialog base units for the given component. In case the component is
  {@code null} the global dialog base units are answered.<p>
  
  Before we compute the dialog base units we check whether they have been computed and cached
  before - for the same component {@code FontMetrics}.
  
  @param c the component that provides the graphics object
  @return the DialogBaseUnits object for the given component