com.esotericsoftware.tablelayout.swing.SwingToolkit.DebugRect Java Examples

The following examples show how to use com.esotericsoftware.tablelayout.swing.SwingToolkit.DebugRect. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TableLayout.java    From object-recognition-tensorflow with Apache License 2.0 5 votes vote down vote up
void drawDebug () {
	Graphics2D g = (Graphics2D)getTable().getGraphics();
	if (g == null) return;
	g.setColor(Color.red);
	for (DebugRect rect : debugRects) {
		if (rect.type == Debug.cell) g.setColor(Color.red);
		if (rect.type == Debug.widget) g.setColor(Color.green);
		if (rect.type == Debug.table) g.setColor(Color.blue);
		g.drawRect(rect.x, rect.y, rect.width, rect.height);
	}
}
 
Example #2
Source File: TableLayout.java    From gdx-texture-packer-gui with Apache License 2.0 5 votes vote down vote up
void drawDebug () {
	Graphics2D g = (Graphics2D)getTable().getGraphics();
	if (g == null) return;
	g.setColor(Color.red);
	for (DebugRect rect : debugRects) {
		if (rect.type == Debug.cell) g.setColor(Color.red);
		if (rect.type == Debug.widget) g.setColor(Color.green);
		if (rect.type == Debug.table) g.setColor(Color.blue);
		g.drawRect(rect.x, rect.y, rect.width, rect.height);
	}
}
 
Example #3
Source File: TableLayout.java    From tablelayout with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
void drawDebug () {
	Graphics2D g = (Graphics2D)getTable().getGraphics();
	if (g == null) return;
	g.setColor(Color.red);
	for (DebugRect rect : debugRects) {
		if (rect.type == Debug.cell) g.setColor(Color.red);
		if (rect.type == Debug.widget) g.setColor(Color.green);
		if (rect.type == Debug.table) g.setColor(Color.blue);
		g.drawRect(rect.x, rect.y, rect.width, rect.height);
	}
}