/* * [Geometry.java] * * Summary: Geometry of the Token display, sizes and margins. * * Copyright: (c) 2004-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 4.0 2009-04-12 shorter style names, improved highlighting. */ package com.mindprod.jdisplay; /** * Geometry of the Token display, sizes and margins. *

* If you change values here, it will change the values is precomputed * Footprints. So you must ensure they are recomputed by deleting the *.ser files. * * @author Roedy Green, Canadian Mind Products * @version 4.0 2009-04-12 shorter style names, improved highlighting. * @see com.mindprod.jdisplayaux.WaysToRender * @since 2004 */ @SuppressWarnings( { "WeakerAccess", "UnusedDeclaration" } ) public final class Geometry { /** * how tall the top bar is when present. Now transparent, so can't see it as a bar. */ public static final int BAR_HEIGHT_PX = 29; /** * blank lines are roughly half as tall as usual. */ public static final int BLANK_LINE_HEIGHT_PX = 10; /** * how many pixels of bottom margin spacing. Has to allow room for below baseline. */ public static final int BOTTOM_PADDING_PX = 8; /** * max amount of display height willing to take up in pixels to display one snippet. If too big we scroll. JDisplay * macro may provide an overriding value. */ public static final int DEFAULT_MAX_HEIGHT_PX = 580; /** * max amount of display width willing to take up in pixels to display one snippet. If too big we scroll. JDisplay * macro may provide an overriding value. */ public static final int DEFAULT_MAX_WIDTH_PX = 1010; /** * width of whitespace around the inside of the Frame, both height and width. */ public static final int FRAME_PADDING_PX = 1; /** * height of the optional scrollbar for sliding left and right. */ public static final int HORIZONTAL_SCROLLBAR_HEIGHT_PX = 16; /** * how many pixels of vertical spacing between baselines. This is leading as in the metal lead, and typesetting. */ public static final int LEADING_PX = 23; /** * how many pixels of left white space. */ public static final int LEFT_PADDING_PX = 5; /** * how many pixels between line numbers and text. */ public static final int LINE_NUMBER_PADDING_PX = 3; /** * the shortest the viewport with scrollbars can be to accommodate vertical thumbtabs. */ public static final int MINIMUM_SCROLLED_VIEWPORT_HEIGHT_PX = 28; /** * the narrowest the viewport with scrollbars can be to accommodate horizontal thumbtabs. */ public static final int MINIMUM_SCROLLED_VIEWPORT_WIDTH_PX = 28; /** * how many pixels of whitespace on the right, */ public static final int RIGHT_PADDING_PX = 7; /** * extra height in pixels needed to render a scrolled display in HTML. This can be changed without rebuilding the * *.ser files. */ public static final int SCROLLED_FAT_HEIGHT_PX = 0; /** * extra width in pixels needed to render a scrolled display in HTML. This can be changed without rebuilding the * *.ser files. */ public static final int SCROLLED_FAT_WIDTH_PX = 0; /** * how many pixels of top margin spacing. There is already plenty built into font ascender. Our first baseline * starts LEADING_PX down from the top. */ public static final int TOP_PADDING_PX = 0; /** * extra height in pixels needed to render in HTML, as if it needed room for non-existent scroll bar. Vista needs * even more room than Win2K. This can be changed without rebuilding the *.ser files. */ public static final int UNSCROLLED_FAT_HEIGHT_PX = 22; /** * extra width in pixels needed to render in HTML. This can be changed without rebuilding the *.ser files. */ public static final int UNSCROLLED_FAT_WIDTH_PX = 0; /** * width of the optional scrollbar for sliding up and down. */ public static final int VERTICAL_SCROLLBAR_WIDTH_PX = 15; /** * leave relatively this much extra room, in case user's fonts are fatter than ours. Applies only to width. */ public static final float SAFETY_FACTOR = 1.02f; }