@Override
    protected void onAttach() {
        super.onAttach();
        // Adding styles to the list item depending on the parent
        if (getParent() != null) {
            if (getParent() instanceof MediaList) {
                addStyleName(Styles.MEDIA);
            }
        }
    }
@ Override protected void onAttach ( ) { super . onAttach ( ) ; if ( getParent ( ) != null ) { if ( getParent ( ) instanceof MediaList ) { addStyleName ( Styles . MEDIA ) ; } } }
{@inheritDoc}