<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_17) on Sun Nov 03 15:35:40 CET 2013 -->
<title>Skin (libgdx API)
</title>
<meta name="date" content="2013-11-03">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Skin (libgdx API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.
</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview
</a></li>
<li><a href="package-summary.html">Package
</a></li>
<li class="navBarCell1Rev">Class
</li>
<li><a href="class-use/Skin.html">Use
</a></li>
<li><a href="package-tree.html">Tree
</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated
</a></li>
<li><a href="../../../../../../index-all.html">Index
</a></li>
<li><a href="../../../../../../help-doc.html">Help
</a></li>
</ul>
<div class="aboutLanguage"><em>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/SelectBox.SelectBoxStyle.html" title="class in com.badlogic.gdx.scenes.scene2d.ui"><span class="strong">Prev Class
</span></a></li>
<li><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.TintedDrawable.html" title="class in com.badlogic.gdx.scenes.scene2d.ui"><span class="strong">Next Class
</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?com/badlogic/gdx/scenes/scene2d/ui/Skin.html" target="_top">Frames
</a></li>
<li><a href="Skin.html" target="_top">No Frames
</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes
</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:
</li>
<li><a href="#nested_class_summary">Nested
</a> |
</li>
<li>Field
|
</li>
<li><a href="#constructor_summary">Constr
</a> |
</li>
<li><a href="#method_summary">Method
</a></li>
</ul>
<ul class="subNavList">
<li>Detail:
</li>
<li>Field
|
</li>
<li><a href="#constructor_detail">Constr
</a> |
</li>
<li><a href="#method_detail">Method
</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.badlogic.gdx.scenes.scene2d.ui
</div>
<h2 title="Class Skin" class="title">Class Skin
</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object
</li>
<li>
<ul class="inheritance">
<li>com.badlogic.gdx.scenes.scene2d.ui.Skin
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:
</dt>
<dd><a href="../../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</a></dd>
</dl>
<hr>
<br>
<pre>public class
<span class="strong">Skin
</span>
extends java.lang.Object
implements
<a href="../../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</a></pre>
<div class="block">A skin stores resources for UI widgets to use (texture regions, ninepatches, fonts, colors, etc). Resources are named and can
be looked up by name and type. Resources can be described in JSON. Skin provides useful conversions, such as allowing access to
regions in the atlas as ninepatches, sprites, drawables, etc. The get* methods return an instance of the object in the skin.
The new* methods return a copy of an instance in the skin.
<p>
See the
<a href="https://code.google.com/p/libgdx/wiki/Skin">documentation
</a> for more.
</div>
<dl><dt><span class="strong">Author:
</span></dt>
<dd>Nathan Sweet
</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary
</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes
</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type
</th>
<th class="colLast" scope="col">Class and Description
</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.TintedDrawable.html" title="class in com.badlogic.gdx.scenes.scene2d.ui">Skin.TintedDrawable
</a></strong></code> </td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary
</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors
</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description
</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#Skin()">Skin
</a></strong>()
</code>
<div class="block">Creates an empty skin.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#Skin(com.badlogic.gdx.files.FileHandle)">Skin
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile)
</code>
<div class="block">Creates a skin containing the resources in the specified skin JSON file.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#Skin(com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.g2d.TextureAtlas)">Skin
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile,
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a> atlas)
</code>
<div class="block">Creates a skin containing the resources in the specified skin JSON file and the texture regions from the specified atlas.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#Skin(com.badlogic.gdx.graphics.g2d.TextureAtlas)">Skin
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a> atlas)
</code>
<div class="block">Creates a skin containing the texture regions from the specified atlas.
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary
</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods
</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type
</th>
<th class="colLast" scope="col">Method and Description
</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#add(java.lang.String, java.lang.Object)">add
</a></strong>(java.lang.String
name,
java.lang.Object
resource)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#add(java.lang.String, java.lang.Object, java.lang.Class)">add
</a></strong>(java.lang.String
name,
java.lang.Object
resource,
java.lang.Class
type)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#addRegions(com.badlogic.gdx.graphics.g2d.TextureAtlas)">addRegions
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a> atlas)
</code>
<div class="block">Adds all named txeture regions from the atlas.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#dispose()">dispose
</a></strong>()
</code>
<div class="block">Disposes the
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas
</code></a> and all
<a href="../../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils"><code>Disposable
</code></a> resources in the skin.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#find(java.lang.Object)">find
</a></strong>(java.lang.Object
resource)
</code>
<div class="block">Returns the name of the specified style object, or null if it is not in the skin.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T
> T
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#get(java.lang.Class)">get
</a></strong>(java.lang.Class
<T
> type)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><T
> T
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#get(java.lang.String, java.lang.Class)">get
</a></strong>(java.lang.String
name,
java.lang.Class
<T
> type)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T
> <a href="../../../../../../com/badlogic/gdx/utils/ObjectMap.html" title="class in com.badlogic.gdx.utils">ObjectMap
</a><java.lang.String,T
></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getAll(java.lang.Class)">getAll
</a></strong>(java.lang.Class
<T
> type)
</code>
<div class="block">Returns the name to resource mapping for the specified type, or null if no resources of that type exist.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getAtlas()">getAtlas
</a></strong>()
</code>
<div class="block">Returns the
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas
</code></a> that resources in this skin reference, or null.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getColor(java.lang.String)">getColor
</a></strong>(java.lang.String
name)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)">getDrawable
</a></strong>(java.lang.String
name)
</code>
<div class="block">Returns a registered drawable.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getFont(java.lang.String)">getFont
</a></strong>(java.lang.String
name)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected
<a href="../../../../../../com/badlogic/gdx/utils/Json.html" title="class in com.badlogic.gdx.utils">Json
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getJsonLoader(com.badlogic.gdx.files.FileHandle)">getJsonLoader
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/graphics/g2d/NinePatch.html" title="class in com.badlogic.gdx.graphics.g2d">NinePatch
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getPatch(java.lang.String)">getPatch
</a></strong>(java.lang.String
name)
</code>
<div class="block">Returns a registered ninepatch.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureRegion
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getRegion(java.lang.String)">getRegion
</a></strong>(java.lang.String
name)
</code>
<div class="block">Returns a registered texture region.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getSprite(java.lang.String)">getSprite
</a></strong>(java.lang.String
name)
</code>
<div class="block">Returns a registered sprite.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/TiledDrawable.html" title="class in com.badlogic.gdx.scenes.scene2d.utils">TiledDrawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getTiledDrawable(java.lang.String)">getTiledDrawable
</a></strong>(java.lang.String
name)
</code>
<div class="block">Returns a registered tiled drawable.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#has(java.lang.String, java.lang.Class)">has
</a></strong>(java.lang.String
name,
java.lang.Class
type)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#load(com.badlogic.gdx.files.FileHandle)">load
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile)
</code>
<div class="block">Adds all resources in the specified skin JSON file.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#newDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable)">newDrawable
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> drawable)
</code>
<div class="block">Returns a copy of the specified drawable.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#newDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable, com.badlogic.gdx.graphics.Color)">newDrawable
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> drawable,
<a href="../../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint)
</code>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#newDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable, float, float, float, float)">newDrawable
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> drawable,
float
r,
float
g,
float
b,
float
a)
</code>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#newDrawable(java.lang.String)">newDrawable
</a></strong>(java.lang.String
name)
</code>
<div class="block">Returns a copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#newDrawable(java.lang.String, com.badlogic.gdx.graphics.Color)">newDrawable
</a></strong>(java.lang.String
name,
<a href="../../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint)
</code>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#newDrawable(java.lang.String, float, float, float, float)">newDrawable
</a></strong>(java.lang.String
name,
float
r,
float
g,
float
b,
float
a)
</code>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T
> T
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#optional(java.lang.String, java.lang.Class)">optional
</a></strong>(java.lang.String
name,
java.lang.Class
<T
> type)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#setEnabled(com.badlogic.gdx.scenes.scene2d.Actor, boolean)">setEnabled
</a></strong>(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/Actor.html" title="class in com.badlogic.gdx.scenes.scene2d">Actor
</a> actor,
boolean
enabled)
</code>
<div class="block">Sets the style on the actor to disabled or enabled.
</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class
java.lang.Object
</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail
</h3>
<a name="Skin()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Skin
</h4>
<pre>public
Skin()
</pre>
<div class="block">Creates an empty skin.
</div>
</li>
</ul>
<a name="Skin(com.badlogic.gdx.files.FileHandle)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Skin
</h4>
<pre>public
Skin(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile)
</pre>
<div class="block">Creates a skin containing the resources in the specified skin JSON file. If a file in the same directory with a ".atlas"
extension exists, it is loaded as a
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas
</code></a> and the texture regions added to the skin. The atlas is
automatically disposed when the skin is disposed.
</div>
</li>
</ul>
<a name="Skin(com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.g2d.TextureAtlas)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Skin
</h4>
<pre>public
Skin(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile,
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a> atlas)
</pre>
<div class="block">Creates a skin containing the resources in the specified skin JSON file and the texture regions from the specified atlas.
The atlas is automatically disposed when the skin is disposed.
</div>
</li>
</ul>
<a name="Skin(com.badlogic.gdx.graphics.g2d.TextureAtlas)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Skin
</h4>
<pre>public
Skin(
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a> atlas)
</pre>
<div class="block">Creates a skin containing the texture regions from the specified atlas. The atlas is automatically disposed when the skin is
disposed.
</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail
</h3>
<a name="load(com.badlogic.gdx.files.FileHandle)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>load
</h4>
<pre>public
void
load(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile)
</pre>
<div class="block">Adds all resources in the specified skin JSON file.
</div>
</li>
</ul>
<a name="addRegions(com.badlogic.gdx.graphics.g2d.TextureAtlas)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addRegions
</h4>
<pre>public
void
addRegions(
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a> atlas)
</pre>
<div class="block">Adds all named txeture regions from the atlas. The atlas will not be automatically disposed when the skin is disposed.
</div>
</li>
</ul>
<a name="add(java.lang.String, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add
</h4>
<pre>public
void
add(java.lang.String
name,
java.lang.Object
resource)
</pre>
</li>
</ul>
<a name="add(java.lang.String, java.lang.Object, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add
</h4>
<pre>public
void
add(java.lang.String
name,
java.lang.Object
resource,
java.lang.Class
type)
</pre>
</li>
</ul>
<a name="get(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get
</h4>
<pre>public
<T
> T
get(java.lang.Class
<T
> type)
</pre>
</li>
</ul>
<a name="get(java.lang.String, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get
</h4>
<pre>public
<T
> T
get(java.lang.String
name,
java.lang.Class
<T
> type)
</pre>
</li>
</ul>
<a name="optional(java.lang.String, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>optional
</h4>
<pre>public
<T
> T
optional(java.lang.String
name,
java.lang.Class
<T
> type)
</pre>
</li>
</ul>
<a name="has(java.lang.String, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>has
</h4>
<pre>public
boolean
has(java.lang.String
name,
java.lang.Class
type)
</pre>
</li>
</ul>
<a name="getAll(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAll
</h4>
<pre>public
<T
> <a href="../../../../../../com/badlogic/gdx/utils/ObjectMap.html" title="class in com.badlogic.gdx.utils">ObjectMap
</a><java.lang.String,T
> getAll(java.lang.Class
<T
> type)
</pre>
<div class="block">Returns the name to resource mapping for the specified type, or null if no resources of that type exist.
</div>
</li>
</ul>
<a name="getColor(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getColor
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> getColor(java.lang.String
name)
</pre>
</li>
</ul>
<a name="getFont(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFont
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a> getFont(java.lang.String
name)
</pre>
</li>
</ul>
<a name="getRegion(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRegion
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureRegion.html" title="class in com.badlogic.gdx.graphics.g2d">TextureRegion
</a> getRegion(java.lang.String
name)
</pre>
<div class="block">Returns a registered texture region. If no region is found but a texture exists with the name, a region is created from the
texture and stored in the skin.
</div>
</li>
</ul>
<a name="getTiledDrawable(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTiledDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/TiledDrawable.html" title="class in com.badlogic.gdx.scenes.scene2d.utils">TiledDrawable
</a> getTiledDrawable(java.lang.String
name)
</pre>
<div class="block">Returns a registered tiled drawable. If no tiled drawable is found but a region exists with the name, a tiled drawable is
created from the region and stored in the skin.
</div>
</li>
</ul>
<a name="getPatch(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPatch
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/NinePatch.html" title="class in com.badlogic.gdx.graphics.g2d">NinePatch
</a> getPatch(java.lang.String
name)
</pre>
<div class="block">Returns a registered ninepatch. If no ninepatch is found but a region exists with the name, a ninepatch is created from the
region and stored in the skin. If the region is an
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas.AtlasRegion
</code></a> then the
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html#splits"><code>TextureAtlas.AtlasRegion.splits
</code></a> are used,
otherwise the ninepatch will have the region as the center patch.
</div>
</li>
</ul>
<a name="getSprite(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSprite
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/Sprite.html" title="class in com.badlogic.gdx.graphics.g2d">Sprite
</a> getSprite(java.lang.String
name)
</pre>
<div class="block">Returns a registered sprite. If no sprite is found but a region exists with the name, a sprite is created from the region
and stored in the skin. If the region is an
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasRegion.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas.AtlasRegion
</code></a> then an
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.AtlasSprite.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas.AtlasSprite
</code></a> is used if the region has been
whitespace stripped or packed rotated 90 degrees.
</div>
</li>
</ul>
<a name="getDrawable(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> getDrawable(java.lang.String
name)
</pre>
<div class="block">Returns a registered drawable. If no drawable is found but a region, ninepatch, or sprite exists with the name, then the
appropriate drawable is created and stored in the skin.
</div>
</li>
</ul>
<a name="find(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>find
</h4>
<pre>public
java.lang.String
find(java.lang.Object
resource)
</pre>
<div class="block">Returns the name of the specified style object, or null if it is not in the skin. This compares potentially every style
object in the skin of the same type as the specified style, which may be a somewhat expensive operation.
</div>
</li>
</ul>
<a name="newDrawable(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> newDrawable(java.lang.String
name)
</pre>
<div class="block">Returns a copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</li>
</ul>
<a name="newDrawable(java.lang.String, float, float, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> newDrawable(java.lang.String
name,
float
r,
float
g,
float
b,
float
a)
</pre>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</li>
</ul>
<a name="newDrawable(java.lang.String, com.badlogic.gdx.graphics.Color)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> newDrawable(java.lang.String
name,
<a href="../../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint)
</pre>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</li>
</ul>
<a name="newDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> newDrawable(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> drawable)
</pre>
<div class="block">Returns a copy of the specified drawable.
</div>
</li>
</ul>
<a name="newDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable, float, float, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> newDrawable(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> drawable,
float
r,
float
g,
float
b,
float
a)
</pre>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</li>
</ul>
<a name="newDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable, com.badlogic.gdx.graphics.Color)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newDrawable
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> newDrawable(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/utils/Drawable.html" title="interface in com.badlogic.gdx.scenes.scene2d.utils">Drawable
</a> drawable,
<a href="../../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint)
</pre>
<div class="block">Returns a tinted copy of a drawable found in the skin via
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.html#getDrawable(java.lang.String)"><code>getDrawable(String)
</code></a>.
</div>
</li>
</ul>
<a name="setEnabled(com.badlogic.gdx.scenes.scene2d.Actor, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnabled
</h4>
<pre>public
void
setEnabled(
<a href="../../../../../../com/badlogic/gdx/scenes/scene2d/Actor.html" title="class in com.badlogic.gdx.scenes.scene2d">Actor
</a> actor,
boolean
enabled)
</pre>
<div class="block">Sets the style on the actor to disabled or enabled. This is done by appending "-disabled" to the style name when enabled is
false, and removing "-disabled" from the style name when enabled is true. A method named "getStyle" is called the actor via
reflection and the name of that style is found in the skin. If the actor doesn't have a "getStyle" method or the style was
not found in the skin, no exception is thrown and the actor is left unchanged.
</div>
</li>
</ul>
<a name="getAtlas()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAtlas
</h4>
<pre>public
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d">TextureAtlas
</a> getAtlas()
</pre>
<div class="block">Returns the
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas
</code></a> that resources in this skin reference, or null.
</div>
</li>
</ul>
<a name="dispose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispose
</h4>
<pre>public
void
dispose()
</pre>
<div class="block">Disposes the
<a href="../../../../../../com/badlogic/gdx/graphics/g2d/TextureAtlas.html" title="class in com.badlogic.gdx.graphics.g2d"><code>TextureAtlas
</code></a> and all
<a href="../../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils"><code>Disposable
</code></a> resources in the skin.
</div>
<dl>
<dt><strong>Specified by:
</strong></dt>
<dd><code><a href="../../../../../../com/badlogic/gdx/utils/Disposable.html#dispose()">dispose
</a></code> in interface
<code><a href="../../../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</a></code></dd>
</dl>
</li>
</ul>
<a name="getJsonLoader(com.badlogic.gdx.files.FileHandle)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getJsonLoader
</h4>
<pre>protected
<a href="../../../../../../com/badlogic/gdx/utils/Json.html" title="class in com.badlogic.gdx.utils">Json
</a> getJsonLoader(
<a href="../../../../../../com/badlogic/gdx/files/FileHandle.html" title="class in com.badlogic.gdx.files">FileHandle
</a> skinFile)
</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview
</a></li>
<li><a href="package-summary.html">Package
</a></li>
<li class="navBarCell1Rev">Class
</li>
<li><a href="class-use/Skin.html">Use
</a></li>
<li><a href="package-tree.html">Tree
</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated
</a></li>
<li><a href="../../../../../../index-all.html">Index
</a></li>
<li><a href="../../../../../../help-doc.html">Help
</a></li>
</ul>
<div class="aboutLanguage"><em>libgdx API
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/SelectBox.SelectBoxStyle.html" title="class in com.badlogic.gdx.scenes.scene2d.ui"><span class="strong">Prev Class
</span></a></li>
<li><a href="../../../../../../com/badlogic/gdx/scenes/scene2d/ui/Skin.TintedDrawable.html" title="class in com.badlogic.gdx.scenes.scene2d.ui"><span class="strong">Next Class
</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?com/badlogic/gdx/scenes/scene2d/ui/Skin.html" target="_top">Frames
</a></li>
<li><a href="Skin.html" target="_top">No Frames
</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes
</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:
</li>
<li><a href="#nested_class_summary">Nested
</a> |
</li>
<li>Field
|
</li>
<li><a href="#constructor_summary">Constr
</a> |
</li>
<li><a href="#method_summary">Method
</a></li>
</ul>
<ul class="subNavList">
<li>Detail:
</li>
<li>Field
|
</li>
<li><a href="#constructor_detail">Constr
</a> |
</li>
<li><a href="#method_detail">Method
</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<div style="font-size:9pt"><i>
Copyright
© 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</small></p>
</body>
</html>