< prev index next >

src/java.desktop/share/classes/javax/swing/text/ParagraphView.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2017, 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 --- 1,7 ---- /* ! * Copyright (c) 1997, 2018, 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
*** 1000,1010 **** //Calls super method after setting spaceAddon to 0. //Justification should not affect MajorAxisRequirements @Override protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { ! int oldJustficationData[] = justificationData; justificationData = null; SizeRequirements ret = super.calculateMajorAxisRequirements(axis, r); if (isJustifyEnabled()) { justificationData = oldJustficationData; } --- 1000,1010 ---- //Calls super method after setting spaceAddon to 0. //Justification should not affect MajorAxisRequirements @Override protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { ! int[] oldJustficationData = justificationData; justificationData = null; SizeRequirements ret = super.calculateMajorAxisRequirements(axis, r); if (isJustifyEnabled()) { justificationData = oldJustficationData; }
*** 1012,1022 **** } @Override protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { ! int oldJustficationData[] = justificationData; justificationData = null; super.layoutMajorAxis(targetSpan, axis, offsets, spans); if (! isJustifyEnabled()) { return; } --- 1012,1022 ---- } @Override protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { ! int[] oldJustficationData = justificationData; justificationData = null; super.layoutMajorAxis(targetSpan, axis, offsets, spans); if (! isJustifyEnabled()) { return; }
*** 1043,1053 **** int endJustifiableContent = -1; int lastLeadingSpaces = 0; int rowStartOffset = getStartOffset(); int rowEndOffset = getEndOffset(); ! int spaceMap[] = new int[rowEndOffset - rowStartOffset]; Arrays.fill(spaceMap, 0); for (int i = getViewCount() - 1; i >= 0 ; i--) { View view = getView(i); if (view instanceof GlyphView) { GlyphView.JustificationInfo justificationInfo = --- 1043,1053 ---- int endJustifiableContent = -1; int lastLeadingSpaces = 0; int rowStartOffset = getStartOffset(); int rowEndOffset = getEndOffset(); ! int[] spaceMap = new int[rowEndOffset - rowStartOffset]; Arrays.fill(spaceMap, 0); for (int i = getViewCount() - 1; i >= 0 ; i--) { View view = getView(i); if (view instanceof GlyphView) { GlyphView.JustificationInfo justificationInfo =
*** 1177,1185 **** static final int SPACE_ADDON_LEFTOVER_END = 1; static final int START_JUSTIFIABLE = 2; //this should be the last index in justificationData static final int END_JUSTIFIABLE = 3; ! int justificationData[] = null; } } --- 1177,1185 ---- static final int SPACE_ADDON_LEFTOVER_END = 1; static final int START_JUSTIFIABLE = 2; //this should be the last index in justificationData static final int END_JUSTIFIABLE = 3; ! int[] justificationData = null; } }
< prev index next >