mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-2842 - Theme consistency updates
This commit is contained in:
parent
bfb0ed6e34
commit
955d4b3998
16 changed files with 219 additions and 250 deletions
|
@ -45,8 +45,8 @@ import resources.ResourceManager;
|
|||
public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvider {
|
||||
|
||||
//@formatter:off
|
||||
public static final Color DEFAULT_VERTEX_SHAPE_COLOR = new GColor("color.bg.fcg.vertex.default");
|
||||
private static final Color TOO_BIG_VERTEX_SHAPE_COLOR = new GColor("color.bg.fcg.vertex.toobig");
|
||||
public static final Color DEFAULT_VERTEX_SHAPE_COLOR = new GColor("color.bg.plugin.fcg.vertex.default");
|
||||
private static final Color TOO_BIG_VERTEX_SHAPE_COLOR = new GColor("color.bg.plugin.fcg.vertex.toobig");
|
||||
//@formatter:on
|
||||
|
||||
public static final Icon NOT_ALLOWED_ICON = Icons.ERROR_ICON;
|
||||
|
@ -55,7 +55,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
private static final Icon COLLAPSE_ICON =
|
||||
ResourceManager.getScaledIcon(Icons.COLLAPSE_ALL_ICON, 10, 10);
|
||||
|
||||
// higher numbered layers go on top
|
||||
// higher numbered layers go on top
|
||||
private static final Integer VERTEX_SHAPE_LAYER = 100;
|
||||
private static final Integer TOGGLE_BUTTON_LAYER = 200;
|
||||
private static final Integer LABEL_LAYER = 300;
|
||||
|
@ -64,7 +64,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
private static final int VERTEX_SHAPE_SIZE = 50;
|
||||
|
||||
// TODO to be made an option in an upcoming ticket
|
||||
// based upon the default function name, plus some extra
|
||||
// based upon the default function name, plus some extra
|
||||
private static final int MAX_NAME_LENGTH = 30;
|
||||
|
||||
private Function function;
|
||||
|
@ -97,7 +97,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*
|
||||
* @param function the function represented by this vertex
|
||||
* @param level the level of this vertex
|
||||
* @param expansionListener the listener for expanding connections to this vertex
|
||||
|
@ -139,7 +139,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
int start = 0;
|
||||
int end = half + offset;
|
||||
|
||||
// paint top-down: dark to light for incoming; light to dark for outgoing
|
||||
// paint top-down: dark to light for incoming; light to dark for outgoing
|
||||
inPaint = new LinearGradientPaint(new Point(0, start), new Point(0, end),
|
||||
new float[] { .0f, .2f, 1f }, new Color[] { darkestColor, darkColor, lightColor });
|
||||
|
||||
|
@ -190,7 +190,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
parent.add(v);
|
||||
parent.add(name);
|
||||
|
||||
// for now, the buttons only appear on hover, but if we want to avoid clipping when
|
||||
// for now, the buttons only appear on hover, but if we want to avoid clipping when
|
||||
// painting, we need to account for them in the shape's overall bounds
|
||||
Area in = new Area(toggleInsButton.getBounds());
|
||||
Area out = new Area(toggleOutsButton.getBounds());
|
||||
|
@ -291,8 +291,8 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
vertexImageLabel.setBounds(x, y, size.width, size.height);
|
||||
Dimension shapeSize = vertexShape.getBounds().getSize();
|
||||
|
||||
// setFrame() will make sure the shape's x,y values are where they need to be
|
||||
// for the later 'full shape' creation
|
||||
// setFrame() will make sure the shape's x,y values are where they need to be
|
||||
// for the later 'full shape' creation
|
||||
vertexShape.setFrame(x, y, shapeSize.width, shapeSize.height);
|
||||
layeredPane.add(vertexImageLabel, VERTEX_SHAPE_LAYER);
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Sets to true if this vertex is showing all edges in the incoming direction
|
||||
*
|
||||
*
|
||||
* @param setExpanded true if this vertex is showing all edges in the incoming direction
|
||||
*/
|
||||
public void setIncomingExpanded(boolean setExpanded) {
|
||||
|
@ -414,7 +414,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Returns true if this vertex is showing all edges in the incoming direction
|
||||
*
|
||||
*
|
||||
* @return true if this vertex is showing all edges in the incoming direction
|
||||
*/
|
||||
public boolean isIncomingExpanded() {
|
||||
|
@ -423,7 +423,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Sets to true if this vertex is showing all edges in the outgoing direction
|
||||
*
|
||||
*
|
||||
* @param setExpanded true if this vertex is showing all edges in the outgoing direction
|
||||
*/
|
||||
public void setOutgoingExpanded(boolean setExpanded) {
|
||||
|
@ -438,7 +438,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Returns true if this vertex is showing all edges in the outgoing direction
|
||||
*
|
||||
*
|
||||
* @return true if this vertex is showing all edges in the outgoing direction
|
||||
*/
|
||||
public boolean isOutgoingExpanded() {
|
||||
|
@ -447,7 +447,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Returns whether this vertex is fully expanded in its current direction
|
||||
*
|
||||
*
|
||||
* @return whether this vertex is fully expanded in its current direction
|
||||
*/
|
||||
public boolean isExpanded() {
|
||||
|
@ -462,10 +462,10 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets whether this vertex has too many incoming references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* Sets whether this vertex has too many incoming references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* usability.
|
||||
*
|
||||
*
|
||||
* @param tooMany if there are too many references
|
||||
*/
|
||||
public void setTooManyIncomingReferences(boolean tooMany) {
|
||||
|
@ -476,10 +476,10 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets whether this vertex has too many outgoing references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* Sets whether this vertex has too many outgoing references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* usability.
|
||||
*
|
||||
*
|
||||
* @param tooMany if there are too many references
|
||||
*/
|
||||
public void setTooManyOutgoingReferences(boolean tooMany) {
|
||||
|
@ -490,10 +490,10 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns whether this vertex has too many incoming references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* Returns whether this vertex has too many incoming references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* usability.
|
||||
*
|
||||
*
|
||||
* @return true if there are too many references
|
||||
*/
|
||||
public boolean hasTooManyIncomingReferences() {
|
||||
|
@ -501,10 +501,10 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns whether this vertex has too many outgoing references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* Returns whether this vertex has too many outgoing references, where too many is subjectively
|
||||
* defined by this class. Too many nodes in the display would ruin rendering and general
|
||||
* usability.
|
||||
*
|
||||
*
|
||||
* @return true if there are too many references
|
||||
*/
|
||||
public boolean hasTooManyOutgoingReferences() {
|
||||
|
@ -512,9 +512,9 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if this vertex can expand itself in its current direction, or in either
|
||||
* Returns true if this vertex can expand itself in its current direction, or in either
|
||||
* direction if this is a source vertex
|
||||
*
|
||||
*
|
||||
* @return true if this vertex can be expanded
|
||||
*/
|
||||
public boolean canExpand() {
|
||||
|
@ -540,7 +540,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Sets whether this vertex has any incoming references
|
||||
*
|
||||
*
|
||||
* @param hasIncoming true if this vertex has any incoming references
|
||||
*/
|
||||
public void setHasIncomingReferences(boolean hasIncoming) {
|
||||
|
@ -549,7 +549,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
/**
|
||||
* Sets whether this vertex has any outgoing references
|
||||
*
|
||||
*
|
||||
* @param hasOutgoing true if this vertex has any outgoing references
|
||||
*/
|
||||
|
||||
|
@ -597,10 +597,7 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((function == null) ? 0 : function.hashCode());
|
||||
return result;
|
||||
return Objects.hash(function);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue