Creates a new cp display layout with the primary key. Does not add the cp display layout to the database.

@param CPDisplayLayoutId the primary key for the new cp display layout
@return the new cp display layout
192805
@Override
	public com.liferay.commerce.product.model.CPDisplayLayout createCPDisplayLayout(
		long CPDisplayLayoutId) {
		return _cpDisplayLayoutLocalService.createCPDisplayLayout(CPDisplayLayoutId);
	}
1218631
public static com.liferay.commerce.product.model.CPOption createCPOption(
		long CPOptionId) {
		return getService().createCPOption(CPOptionId);
	}
160656
View createPresetsView() {
    View contentView = View.inflate(getActivity(), R.layout.cpv_dialog_presets, null);
    shadesLayout = (LinearLayout) contentView.findViewById(R.id.shades_layout);
    transparencySeekBar = (SeekBar) contentView.findViewById(R.id.transparency_seekbar);
    transparencyPercText = (TextView) contentView.findViewById(R.id.transparency_text);
    GridView gridView = (GridView) contentView.findViewById(R.id.gridView);

    loadPresets();

    if (showColorShades) {
      createColorShades(color);
    } else {
      shadesLayout.setVisibility(View.GONE);
      contentView.findViewById(R.id.shades_divider).setVisibility(View.GONE);
    }

    adapter = new ColorPaletteAdapter(new ColorPaletteAdapter.OnColorSelectedListener() {
      @Override public void onColorSelected(int newColor) {
        if (color == newColor) {
          // Double tab selects the color
          ColorPickerDialog.this.onColorSelected(color);
          dismiss();
          return;
        }
        color = newColor;
        if (showColorShades) {
          createColorShades(color);
        }
      }
    }, presets, getSelectedItemPosition(), colorShape);

    gridView.setAdapter(adapter);

    if (showAlphaSlider) {
      setupTransparency();
    } else {
      contentView.findViewById(R.id.transparency_layout).setVisibility(View.GONE);
      contentView.findViewById(R.id.transparency_title).setVisibility(View.GONE);
    }

    return contentView;
  }
569602
@Override
	public void cacheResult(CPDisplayLayout cpDisplayLayout) {
		entityCache.putResult(CPDisplayLayoutModelImpl.ENTITY_CACHE_ENABLED,
			CPDisplayLayoutImpl.class, cpDisplayLayout.getPrimaryKey(),
			cpDisplayLayout);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] { cpDisplayLayout.getUuid(), cpDisplayLayout.getGroupId() },
			cpDisplayLayout);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_C,
			new Object[] {
				cpDisplayLayout.getClassNameId(), cpDisplayLayout.getClassPK()
			}, cpDisplayLayout);

		cpDisplayLayout.resetOriginalValues();
	}
992867
@Override
    public String getLayoutContentByAppId(String appId) {
        String value = propertyService.getValue(PROPERTY_LAYOUT_ASSOCIATION, appId);
        return value == null ? null : getLayoutContent(new LayoutIdentifier(value, true));
    }
402921
public UI wrapLayout(Layout layout) {
        // TODO: add a header to switch the style, etc
        // TODO: add bookmark to set the style
        if (server.getConfig().isDevelopmentHeader()) {
            final VerticalSplitPanel mainLayout = new VerticalSplitPanel();
            mainLayout.setSizeFull();
            mainLayout.setSplitPosition(SPLIT_POSITION, Sizeable.Unit.PIXELS);
            mainLayout.setLocked(true);

            final DevApplicationHeader header = new DevApplicationHeader(server);
            header.setSpacing(true);
            mainLayout.setFirstComponent(header);

            mainLayout.setSecondComponent(layout);

            return new DevUI(mainLayout);
        } else {
            return new DevUI(layout);
        }
    }
1020830
@Override
	@Transactional(enabled = false)
	public CPFriendlyURLEntry createCPFriendlyURLEntry(
		long CPFriendlyURLEntryId) {
		return cpFriendlyURLEntryPersistence.create(CPFriendlyURLEntryId);
	}
1011147
View createPickerView() {
    View contentView = View.inflate(getActivity(), R.layout.cpv_dialog_color_picker, null);
    colorPicker = (ColorPickerView) contentView.findViewById(R.id.cpv_color_picker_view);
    ColorPanelView oldColorPanel = (ColorPanelView) contentView.findViewById(R.id.cpv_color_panel_old);
    newColorPanel = (ColorPanelView) contentView.findViewById(R.id.cpv_color_panel_new);
    ImageView arrowRight = (ImageView) contentView.findViewById(R.id.cpv_arrow_right);
    hexEditText = (EditText) contentView.findViewById(R.id.cpv_hex);

    try {
      final TypedValue value = new TypedValue();
      TypedArray typedArray =
          getActivity().obtainStyledAttributes(value.data, new int[] { android.R.attr.textColorPrimary });
      int arrowColor = typedArray.getColor(0, Color.BLACK);
      typedArray.recycle();
      arrowRight.setColorFilter(arrowColor);
    } catch (Exception ignored) {
    }

    colorPicker.setAlphaSliderVisible(showAlphaSlider);
    oldColorPanel.setColor(getArguments().getInt(ARG_COLOR));
    colorPicker.setColor(color, true);
    newColorPanel.setColor(color);
    setHex(color);

    if (!showAlphaSlider) {
      hexEditText.setFilters(new InputFilter[] { new InputFilter.LengthFilter(6) });
    }

    newColorPanel.setOnClickListener(new View.OnClickListener() {
      @Override public void onClick(View v) {
        if (newColorPanel.getColor() == color) {
          onColorSelected(color);
          dismiss();
        }
      }
    });

    contentView.setOnTouchListener(onPickerTouchListener);
    colorPicker.setOnColorChangedListener(this);
    hexEditText.addTextChangedListener(this);

    hexEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
      @Override public void onFocusChange(View v, boolean hasFocus) {
        if (hasFocus) {
          InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
          imm.showSoftInput(hexEditText, InputMethodManager.SHOW_IMPLICIT);
        }
      }
    });

    return contentView;
  }
43084
@SuppressWarnings("WeakerAccess")
  public CreateInstanceRequest setDisplayName(@Nonnull String displayName) {
    Preconditions.checkNotNull(displayName);
    builder.getInstanceBuilder().setDisplayName(displayName);
    return this;
  }
545093
@Override
	public CPDefinitionOptionRel create(long CPDefinitionOptionRelId) {
		CPDefinitionOptionRel cpDefinitionOptionRel = new CPDefinitionOptionRelImpl();

		cpDefinitionOptionRel.setNew(true);
		cpDefinitionOptionRel.setPrimaryKey(CPDefinitionOptionRelId);

		String uuid = PortalUUIDUtil.generate();

		cpDefinitionOptionRel.setUuid(uuid);

		cpDefinitionOptionRel.setCompanyId(companyProvider.getCompanyId());

		return cpDefinitionOptionRel;
	}
521451
public static CPDisplayLayout removeByUUID_G(String uuid, long groupId)
		throws com.liferay.commerce.product.exception.NoSuchCPDisplayLayoutException {
		return getPersistence().removeByUUID_G(uuid, groupId);
	}
846754
public static com.liferay.commerce.model.CPDefinitionInventory addCPDefinitionInventory(
		com.liferay.commerce.model.CPDefinitionInventory cpDefinitionInventory) {
		return getService().addCPDefinitionInventory(cpDefinitionInventory);
	}
1335954
@Override
	public com.liferay.commerce.product.model.CPDefinitionOptionRel createCPDefinitionOptionRel(
		long CPDefinitionOptionRelId) {
		return _cpDefinitionOptionRelLocalService.createCPDefinitionOptionRel(CPDefinitionOptionRelId);
	}
1212929
@Override
	@Transactional(enabled = false)
	public CPOptionValue createCPOptionValue(long CPOptionValueId) {
		return cpOptionValuePersistence.create(CPOptionValueId);
	}
772929
function setLayout(d, layout, lastDisplay) {
        if (layout === 'vertical' || layout === 'multimode_vertical' ||
            layout === 'all_vertical') {

            d.displayDiv.style.float = 'none';
            d.titleDiv.style.float = 'none';
            d.titleDiv.style['margin-right'] = '0px';
            d.contentDiv.style.float = 'none';
            return true;
        }
        if (layout === 'horizontal') {
            d.displayDiv.style.float = 'none';
            d.titleDiv.style.float = 'left';
            d.titleDiv.style['margin-right'] = '6px';
            d.contentDiv.style.float = 'right';
            return true;
        }
        if (layout === 'multimode_horizontal') {
            d.displayDiv.style.float = 'left';
            d.titleDiv.style.float = 'none';
            d.titleDiv.style['margin-right'] = '0px';
            d.contentDiv.style.float = 'none';
            if (!lastDisplay) {
                d.displayDiv.style['margin-right'] = '10px';
            }
            return true;
        }
        if (layout === 'all_horizontal') {
            d.displayDiv.style.float = 'left';
            d.titleDiv.style.float = 'left';
            d.titleDiv.style['margin-right'] = '6px';
            d.contentDiv.style.float = 'right';
            if (!lastDisplay) {
                d.displayDiv.style['margin-right'] = '10px';
            }
            return true;
        }
        return false;
    }
80719
private P createViewIdAndCreatePresenter() {

    P presenter = delegateCallback.createPresenter();
    if (presenter == null) {
      throw new NullPointerException(
          "Presenter returned from createPresenter() is null. Activity is " + getActivity());
    }
    if (keepPresenterInstanceDuringScreenOrientationChanges) {
      mosbyViewId = UUID.randomUUID().toString();
      PresenterManager.putPresenter(getActivity(), mosbyViewId, presenter);
    }
    return presenter;
  }
422226
public static com.liferay.commerce.product.model.CPDefinitionLink createCPDefinitionLink(
		long CPDefinitionLinkId) {
		return getService().createCPDefinitionLink(CPDefinitionLinkId);
	}