<commit_before>//
// Triple Play - utilities for use in PlayN-based games
// Copyright (c) 2011, Three Rings Design, Inc. - All rights reserved.
// http://github.com/threerings/tripleplay/blob/master/LICENSE

package tripleplay.ui;

import pythagoras.f.Dimension;
import pythagoras.f.IDimension;

/**
 * An invisible widget that simply requests a fixed amount of space.
 */
public class Shim extends Element<Shim>
{
    public Shim (float width, float height) {
        _size = new Dimension(width, height);
    }

    public Shim (IDimension size) {
        _size = new Dimension(size);
    }

    @Override protected LayoutData createLayoutData (float hintX, float hintY) {
        return new LayoutData() {
            @Override public Dimension computeSize (float hintX, float hintY) {
                return new Dimension(_size);
            }
        };
    }

    protected final Dimension _size;
}
<commit_msg>A shim can be done like this now<commit_after>//
// Triple Play - utilities for use in PlayN-based games
// Copyright (c) 2011, Three Rings Design, Inc. - All rights reserved.
// http://github.com/threerings/tripleplay/blob/master/LICENSE

package tripleplay.ui;

import pythagoras.f.Dimension;
import pythagoras.f.IDimension;

/**
 * An invisible widget that simply requests a fixed amount of space.
 */
public class Shim extends Element<Shim>
{
    public Shim (float width, float height) {
        _size = new Dimension(width, height);
    }

    public Shim (IDimension size) {
        _size = new Dimension(size);
    }

    @Override protected LayoutData createLayoutData (float hintX, float hintY) {
        return new SizableLayoutData(null, _size);
    }

    protected final Dimension _size;
}

{'fraction_non_alphanumeric': 0.09523809523809523, 'fraction_numerical': 0.004645760743321719, 'mean_word_length': 2.9700460829493087, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1357358', 'n_tokens_mistral': 528, 'n_tokens_neox': 498, 'n_words': 167}