< prev index next > modules/javafx.graphics/src/main/java/com/sun/javafx/scene/text/TextLayout.java
Print this page
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
public static final int TYPE_STRIKETHROUGH = 1 << 2;
public static final int TYPE_BASELINE = 1 << 3;
public static final int TYPE_TOP = 1 << 4;
public static final int TYPE_BEARINGS = 1 << 5;
+ static final int DEFAULT_TAB_SIZE = 8;
+
public static class Hit {
int charIndex;
int insertionIndex;
boolean leading;
* @param type the type of the shapes to include
* @return the shape
*/
public Shape getShape(int type, TextSpan filter);
+ /**
+ * Sets the tab size for the TextLayout.
+ *
+ * @param spaces the number of spaces represented by a tab. Default is 8.
+ * Minimum is 1, lower values will be clamped to 1.
+ * @return returns true if the call modifies the layout internal state.
+ */
+ public boolean setTabSize(int spaces);
+
public Hit getHitInfo(float x, float y);
public PathElement[] getCaretShape(int offset, boolean isLeading,
float x, float y);
public PathElement[] getRange(int start, int end, int type,
< prev index next >