當前位置: 首頁>>代碼示例>>Java>>正文


Java IntrospectedProperty類代碼示例

本文整理匯總了Java中com.intellij.uiDesigner.propertyInspector.IntrospectedProperty的典型用法代碼示例。如果您正苦於以下問題:Java IntrospectedProperty類的具體用法?Java IntrospectedProperty怎麽用?Java IntrospectedProperty使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IntrospectedProperty類屬於com.intellij.uiDesigner.propertyInspector包,在下文中一共展示了IntrospectedProperty類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: Palette

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
/**
 * Invoked by reflection
 */
public Palette(Project project) {
  myProject = project;
  myLafManagerListener = project == null ? null : new MyLafManagerListener();
  myClass2Properties = new HashMap<Class, IntrospectedProperty[]>();
  myClassName2Item = new HashMap<String, ComponentItem>();
  myGroups = new ArrayList<GroupItem>();

  if (project != null) {
    mySpecialGroup.setReadOnly(true);
    mySpecialGroup.addItem(ComponentItem.createAnyComponentItem(project));
  }

  if (myLafManagerListener != null) {
    LafManager.getInstance().addLafManagerListener(myLafManagerListener);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:Palette.java

示例2: run

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
public void run() {
  if (!myEditor.ensureEditable()) {
    return;
  }
  Runnable runnable = new Runnable() {
    public void run() {
      final Palette palette = Palette.getInstance(myEditor.getProject());
      IntrospectedProperty[] props = palette.getIntrospectedProperties(myLabel);
      boolean modified = false;
      for(IntrospectedProperty prop: props) {
        if (prop.getName().equals(SwingProperties.LABEL_FOR) && prop instanceof IntroComponentProperty) {
          IntroComponentProperty icp = (IntroComponentProperty) prop;
          icp.setValueEx(myLabel, myComponent.getId());
          modified = true;
          break;
        }
      }
      if (modified) myEditor.refreshAndSave(false);
    }
  };
  CommandProcessor.getInstance().executeCommand(myEditor.getProject(), runnable,
                                                UIDesignerBundle.message("inspection.no.label.for.command"), null);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:NoLabelForInspection.java

示例3: initDefaultProperties

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
public void initDefaultProperties(@NotNull final ComponentItem item) {
  final IntrospectedProperty[] properties = getPalette().getIntrospectedProperties(this);
  for (final IntrospectedProperty property : properties) {
    final Object initialValue = item.getInitialValue(property);
    if (initialValue != null) {
      try {
        //noinspection unchecked
        property.setValue(this, initialValue);
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }

  myConstraints.restore(item.getDefaultConstraints());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:RadComponent.java

示例4: writeProperties

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
protected final void writeProperties(final XmlWriter writer) {
  writer.startElement(UIFormXmlConstants.ELEMENT_PROPERTIES);
  try {
    final IntrospectedProperty[] introspectedProperties =
      getPalette().getIntrospectedProperties(this);
    for (final IntrospectedProperty property : introspectedProperties) {
      if (isMarkedAsModified(property)) {
        final Object value = property.getValue(this);
        if (value != null) {
          writer.startElement(property.getName());
          try {
            //noinspection unchecked
            property.write(value, writer);
          }
          finally {
            writer.endElement();
          }
        }
      }
    }
  }
  finally {
    writer.endElement(); // properties
  }
  writeClientProperties(writer);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:27,代碼來源:RadComponent.java

示例5: loadLwProperty

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
public void loadLwProperty(final LwComponent lwComponent,
                           final LwIntrospectedProperty lwProperty,
                           final IntrospectedProperty property) {
  myLoadingProperties = true;
  try {
    try {
      final Object value = lwComponent.getPropertyValue(lwProperty);
      //noinspection unchecked
      property.setValue(this, value);
    }
    catch (Exception e) {
      LOG.error(e);
      //TODO[anton,vova]: show error and continue to load form
    }
  }
  finally {
    myLoadingProperties = false;
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:RadComponent.java

示例6: getIntrospectedProperty

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
/**
 * @return introspected property with the given <code>name</code> of the
 * specified <code>class</code>. The method returns <code>null</code> if there is no
 * property with the such name.
 */
@Nullable
public IntrospectedProperty getIntrospectedProperty(@NotNull final RadComponent component, @NotNull final String name) {
  final IntrospectedProperty[] properties = getIntrospectedProperties(component);
  for (final IntrospectedProperty property : properties) {
    if (name.equals(property.getName())) {
      return property;
    }
  }
  return null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:Palette.java

示例7: getInplaceProperty

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
/**
 * @return "inplace" property for the component with the specified class.
 * <b>DO NOT USE THIS METHOD DIRECTLY</b>. Use {@link RadComponent#getInplaceProperty(int, int) }
 * instead.
 */
@Nullable
public IntrospectedProperty getInplaceProperty(@NotNull final RadComponent component) {
  final String inplaceProperty = Properties.getInstance().getInplaceProperty(component.getComponentClass());
  final IntrospectedProperty[] properties = getIntrospectedProperties(component);
  for (int i = properties.length - 1; i >= 0; i--) {
    final IntrospectedProperty property = properties[i];
    if (property.getName().equals(inplaceProperty)) {
      return property;
    }
  }
  return null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:Palette.java

示例8: lookAndFeelChanged

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
@Override
public void lookAndFeelChanged(final LafManager source) {
  for (final IntrospectedProperty[] properties : myClass2Properties.values()) {
    LOG.assertTrue(properties != null);
    for (int j = properties.length - 1; j >= 0; j--) {
      updateUI(properties[j]);
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:Palette.java

示例9: getModifiedProperties

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
public IProperty[] getModifiedProperties() {
  IntrospectedProperty[] props = getPalette().getIntrospectedProperties(this);
  ArrayList<IProperty> result = new ArrayList<IProperty>();
  for (IntrospectedProperty prop : props) {
    if (isMarkedAsModified(prop)) {
      result.add(prop);
    }
  }
  return result.toArray(new IProperty[result.size()]);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:RadComponent.java

示例10: Palette

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
/** Invoked by reflection */
public Palette(Project project) {
  myProject = project;
  myLafManagerListener = new MyLafManagerListener();
  myClass2Properties = new HashMap<Class, IntrospectedProperty[]>();
  myClassName2Item = new HashMap<String, ComponentItem>();
  myGroups = new ArrayList<GroupItem>();

  if (project != null) {
    mySpecialGroup.setReadOnly(true);
    mySpecialGroup.addItem(ComponentItem.createAnyComponentItem(project));
  }

  LafManager.getInstance().addLafManagerListener(myLafManagerListener);
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:16,代碼來源:Palette.java

示例11: getIntrospectedProperty

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
/**
 * @return introspected property with the given <code>name</code> of the
 * specified <code>class</code>. The method returns <code>null</code> if there is no
 * property with the such name.
 */
@Nullable
public IntrospectedProperty getIntrospectedProperty(@NotNull final RadComponent component, @NotNull final String name){
  final IntrospectedProperty[] properties = getIntrospectedProperties(component);
  for (final IntrospectedProperty property: properties) {
    if (name.equals(property.getName())) {
      return property;
    }
  }
  return null;
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:16,代碼來源:Palette.java

示例12: getInplaceProperty

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
/**
 * @return "inplace" property for the component with the specified class.
 * <b>DO NOT USE THIS METHOD DIRECTLY</b>. Use {@link com.intellij.uiDesigner.radComponents.RadComponent#getInplaceProperty(int, int) }
 * instead.
 */
@Nullable
public IntrospectedProperty getInplaceProperty(@NotNull final RadComponent component) {
  final String inplaceProperty = Properties.getInstance().getInplaceProperty(component.getComponentClass());
  final IntrospectedProperty[] properties = getIntrospectedProperties(component);
  for (int i = properties.length - 1; i >= 0; i--) {
    final IntrospectedProperty property = properties[i];
    if(property.getName().equals(inplaceProperty)){
      return property;
    }
  }
  return null;
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:18,代碼來源:Palette.java

示例13: lookAndFeelChanged

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
public void lookAndFeelChanged(final LafManager source) {
  for (final IntrospectedProperty[] properties : myClass2Properties.values()) {
    LOG.assertTrue(properties != null);
    for (int j = properties.length - 1; j >= 0; j--) {
      updateUI(properties[j]);
    }
  }
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:9,代碼來源:Palette.java

示例14: Palette

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
/** Invoked by reflection */
public Palette(Project project) {
  myProject = project;
  myLafManagerListener = new MyLafManagerListener();
  myClass2Properties = new HashMap<Class, IntrospectedProperty[]>();
  myClassName2Item = new HashMap<String, ComponentItem>();
  myGroups = new ArrayList<GroupItem>();

  if (project != null) {
    mySpecialGroup.setReadOnly(true);
    mySpecialGroup.addItem(ComponentItem.createAnyComponentItem(project));
  }
}
 
開發者ID:consulo,項目名稱:consulo-ui-designer,代碼行數:14,代碼來源:Palette.java

示例15: getIntrospectedProperties

import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //導入依賴的package包/類
@NotNull
public IntrospectedProperty[] getIntrospectedProperties(@NotNull final RadComponent component) {
  return getIntrospectedProperties(component.getComponentClass(), component.getDelegee().getClass());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:Palette.java


注:本文中的com.intellij.uiDesigner.propertyInspector.IntrospectedProperty類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。