1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Added a new PropertyPanel constructor.

This commit is contained in:
jules 2013-10-30 14:03:11 +00:00
parent 282078bf61
commit 08384a5293
2 changed files with 16 additions and 1 deletions

View file

@ -180,8 +180,19 @@ private:
//==============================================================================
PropertyPanel::PropertyPanel()
: messageWhenEmpty (TRANS("(nothing selected)"))
{
init();
}
PropertyPanel::PropertyPanel (const String& name) : Component (name)
{
init();
}
void PropertyPanel::init()
{
messageWhenEmpty = TRANS("(nothing selected)");
addAndMakeVisible (&viewport);
viewport.setViewedComponent (propertyHolderComponent = new PropertyHolderComponent());
viewport.setFocusContainer (true);

View file

@ -45,6 +45,9 @@ public:
/** Creates an empty property panel. */
PropertyPanel();
/** Creates an empty property panel. */
PropertyPanel (const String& name);
/** Destructor. */
~PropertyPanel();
@ -153,6 +156,7 @@ private:
PropertyHolderComponent* propertyHolderComponent;
String messageWhenEmpty;
void init();
void updatePropHolderLayout() const;
void updatePropHolderLayout (int width) const;