enableVisibleControl(xControlContainer.getControl("yesFrameOptionButton"), bool);
enableVisibleControl(xControlContainer.getControl("noFrameOptionButton"), bool);
}
public void setTargetDiagramPropsControls(boolean bool){
XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xPropsDialog);
if(bool){
//color controls
((XCheckBox)UnoRuntime.queryInterface(XCheckBox.class, xControlContainer.getControl("modifyColorsCheckBox"))).setState((short)0);
((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("allDiagramOptionButton"))).setState(true);
if(getController().getDiagram().isBaseColorsMode())
((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("baseColorsOptionButton"))).setState(true);
if(getController().getDiagram().isSimpleColorMode())
((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("colorOptionButton"))).setState(true);
if(getController().getDiagram().isColorThemeMode())
((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("preDefinedColorThemesOptionButton"))).setState(true);
if(getController().getDiagram().isColorSchemeMode())
((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("preDefinedColorSchemesOptionButton"))).setState(true);
setImageColorOfControl(xControlContainer.getControl("colorImageControl"), getController().getDiagram().getColorProp());
short pos = 0;
if(getController().getDiagram().isColorThemeMode())
pos = (short)(getController().getDiagram().getColorModeProp() - Diagram.FIRST_COLORTHEME_MODE_VALUE);
((XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("preDefinedColorThemesListBox"))).selectItemPos(pos, true);
pos = 0;
if(getController().getDiagram().isColorSchemeMode())
pos = (short)(getController().getDiagram().getColorModeProp() - Diagram.FIRST_COLORSCHEME_MODE_VALUE);
((XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("preDefinedColorSchemesListBox"))).selectItemPos(pos, true);
enableTargetDiagramColorControls(false);
//layout controls
if(((TargetDiagram)getController().getDiagram()).isLeftLayoutProperty())
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("leftLayoutOptionButton"))).setState(true);
else
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("centerLayoutOptionButton"))).setState(true);
//outline controls
pos = 0;
int lineWidth = getController().getDiagram().getShapesLineWidhtProp();
if(lineWidth != 0)
pos = (short)(lineWidth / 100);
((XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("lineWidthListBox"))).selectItemPos(pos, true);
if(getController().getDiagram().isOutlineProp()){
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("yesOutlineOptionButton"))).setState(true);
setPropsDialogLineWidthControls(true);
} else {
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("noOutlineOptionButton"))).setState(true);
setPropsDialogLineWidthControls(false);
}
//textFrame props
if(getController().getDiagram().isFrameProp())
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("yesFrameOptionButton"))).setState(true);
else
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("noFrameOptionButton"))).setState(true);
}
if(!isShownPropsDialog()){
//text controls
//check font properties in shape and store in Diagram properties
//getController().getDiagram().setFontPropertyValues();
boolean isFitText = getController().getDiagram().isTextFitProp();
if(isFitText){
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("textFitOptionButton"))).setState(true);
}else{
((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("fontSizeOptionButton"))).setState(true);
XListBox fontSizeLB = (XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("fontSizeListBox"));
//short selectedItemPos = fontSizeLB.getSelectedItemPos();
short index = FontSize._getIndexOfFontSize(getController().getDiagram().getFontSizeProp());
fontSizeLB.selectItemPos(index, true);
String label = fontSizeLB.getSelectedItem();
if(!label.startsWith("*"))
label = "*" + label.substring(1);
fontSizeLB.removeItems(index, (short)1);
fontSizeLB.addItem(label, index);
fontSizeLB.selectItemPos(index, true);
}
enableFontSizeListBox(!isFitText);
if(getController().getDiagram().isTextColorChange())
((XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, xControlContainer.getControl("modifyTextColorCheckBox"))).setState((short)1);
else
((XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, xControlContainer.getControl("modifyTextColorCheckBox"))).setState((short)0);
enableTextColorImageControl(getController().getDiagram().isTextColorChange());
}
}