Skip to content

Commit

Permalink
[prmr#528] Fix TypeNodeRenderer not displaying interface text on gui and
Browse files Browse the repository at this point in the history
add copyright information.
  • Loading branch information
jkcoding7 committed Feb 10, 2024
1 parent 7eed384 commit d454321
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 22 additions & 2 deletions src/org/jetuml/rendering/CanvasFont.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*******************************************************************************
* JetUML - A desktop application for fast UML diagramming.
*
* Copyright (C) 2020, 2021 by McGill University.
*
* See: https://github.com/prmr/JetUML
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses.
*******************************************************************************/
package org.jetuml.rendering;

import org.jetuml.annotations.Singleton;
Expand All @@ -11,8 +31,8 @@
import javafx.scene.text.FontWeight;

/**
* Responsible for performing more rudimentary operations involving font,
* as well as being synchronized with the user's current font.
* A singleton that is in sync with user font size setting and
* manages font metrics calculations.
*/
@Singleton
public final class CanvasFont implements IntegerPreferenceChangeHandler
Expand Down
4 changes: 2 additions & 2 deletions src/org/jetuml/rendering/nodes/TypeNodeRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ else if( methodHeight > 0 )
}
}

private static void drawName(TypeNode pNode, Rectangle pBounds, int pSplitY, int pNameBoxHeight, GraphicsContext pGraphics)
private void drawName(TypeNode pNode, Rectangle pBounds, int pSplitY, int pNameBoxHeight, GraphicsContext pGraphics)
{
String name = pNode.getName();
String name = getNameText(pNode);
if( name.length() > 2 && name.startsWith("/") && name.endsWith("/") )
{
ITALIC_NAME_VIEWER.draw(removeMarkup(name), pGraphics,
Expand Down

0 comments on commit d454321

Please sign in to comment.