Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3d16e27d
Kaydet (Commit)
3d16e27d
authored
Kas 25, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
java,wizards: convert event listeners to inner classes
Change-Id: Id6a6991704009b909e5108daf65c48722fa97447
üst
57a2f61e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
17 deletions
+35
-17
FormConfiguration.java
wizards/com/sun/star/wizards/form/FormConfiguration.java
+10
-4
PrimaryKeyHandler.java
wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
+21
-4
UnoDialog2.java
wizards/com/sun/star/wizards/ui/UnoDialog2.java
+4
-9
No files found.
wizards/com/sun/star/wizards/form/FormConfiguration.java
Dosyayı görüntüle @
3d16e27d
...
@@ -17,17 +17,19 @@
...
@@ -17,17 +17,19 @@
*/
*/
package
com
.
sun
.
star
.
wizards
.
form
;
package
com
.
sun
.
star
.
wizards
.
form
;
import
com.sun.star.awt.ItemEvent
;
import
com.sun.star.awt.XCheckBox
;
import
com.sun.star.awt.XCheckBox
;
import
com.sun.star.awt.XFixedText
;
import
com.sun.star.awt.XFixedText
;
import
com.sun.star.awt.XListBox
;
import
com.sun.star.awt.XListBox
;
import
com.sun.star.awt.XRadioButton
;
import
com.sun.star.awt.XRadioButton
;
import
com.sun.star.wizards.common.Helper
;
import
com.sun.star.wizards.common.Helper
;
import
com.sun.star.wizards.common.PropertyNames
;
import
com.sun.star.wizards.common.PropertyNames
;
import
com.sun.star.wizards.db.RelationController
;
import
com.sun.star.wizards.ui.CommandFieldSelection
;
import
com.sun.star.wizards.ui.CommandFieldSelection
;
import
com.sun.star.wizards.ui.UIConsts
;
import
com.sun.star.wizards.ui.UIConsts
;
import
com.sun.star.wizards.ui.UnoDialog
;
import
com.sun.star.wizards.ui.UnoDialog
;
import
com.sun.star.wizards.ui.WizardDialog
;
import
com.sun.star.wizards.ui.WizardDialog
;
import
com.sun.star.wizards.
db.RelationControll
er
;
import
com.sun.star.wizards.
ui.event.XItemListenerAdapt
er
;
/**
/**
* To change the template for this generated type comment go to
* To change the template for this generated type comment go to
...
@@ -46,7 +48,6 @@ public class FormConfiguration
...
@@ -46,7 +48,6 @@ public class FormConfiguration
XListBox
lstRelations
;
XListBox
lstRelations
;
String
[]
sreferencedTables
;
String
[]
sreferencedTables
;
CommandFieldSelection
CurSubFormFieldSelection
;
CommandFieldSelection
CurSubFormFieldSelection
;
String
SSUBFORMMODE
=
"toggleSubFormMode"
;
String
STOGGLESTEPS
=
"toggleSteps"
;
String
STOGGLESTEPS
=
"toggleSteps"
;
String
SONEXISTINGRELATIONSELECTION
=
"onexistingRelationSelection"
;
String
SONEXISTINGRELATIONSELECTION
=
"onexistingRelationSelection"
;
boolean
bsupportsRelations
;
boolean
bsupportsRelations
;
...
@@ -64,7 +65,12 @@ public class FormConfiguration
...
@@ -64,7 +65,12 @@ public class FormConfiguration
String
sSubFormDescription
=
CurUnoDialog
.
m_oResource
.
getResText
(
UIConsts
.
RID_FORM
+
3
);
String
sSubFormDescription
=
CurUnoDialog
.
m_oResource
.
getResText
(
UIConsts
.
RID_FORM
+
3
);
// CheckBox 'Add sub form'
// CheckBox 'Add sub form'
chkcreateSubForm
=
CurUnoDialog
.
insertCheckBox
(
"chkcreateSubForm"
,
SSUBFORMMODE
,
this
,
chkcreateSubForm
=
CurUnoDialog
.
insertCheckBox
(
"chkcreateSubForm"
,
new
XItemListenerAdapter
()
{
@Override
public
void
itemStateChanged
(
ItemEvent
event
)
{
toggleSubFormMode
();
}
},
new
String
[]
new
String
[]
{
{
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
...
@@ -132,7 +138,7 @@ public class FormConfiguration
...
@@ -132,7 +138,7 @@ public class FormConfiguration
return
((
chkcreateSubForm
.
getState
()
==
1
)
&&
(
optOnExistingRelation
.
getState
()));
return
((
chkcreateSubForm
.
getState
()
==
1
)
&&
(
optOnExistingRelation
.
getState
()));
}
}
p
ublic
void
toggleSubFormMode
()
p
rivate
void
toggleSubFormMode
()
{
{
boolean
bdoEnable
=
(
this
.
chkcreateSubForm
.
getState
()
==
1
);
boolean
bdoEnable
=
(
this
.
chkcreateSubForm
.
getState
()
==
1
);
Helper
.
setUnoPropertyValue
(
UnoDialog
.
getModel
(
optOnExistingRelation
),
PropertyNames
.
PROPERTY_ENABLED
,
Boolean
.
valueOf
(
bdoEnable
&&
bsupportsRelations
));
Helper
.
setUnoPropertyValue
(
UnoDialog
.
getModel
(
optOnExistingRelation
),
PropertyNames
.
PROPERTY_ENABLED
,
Boolean
.
valueOf
(
bdoEnable
&&
bsupportsRelations
));
...
...
wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
Dosyayı görüntüle @
3d16e27d
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
*/
*/
package
com
.
sun
.
star
.
wizards
.
table
;
package
com
.
sun
.
star
.
wizards
.
table
;
import
com.sun.star.awt.ItemEvent
;
import
com.sun.star.awt.XCheckBox
;
import
com.sun.star.awt.XCheckBox
;
import
com.sun.star.awt.XFixedText
;
import
com.sun.star.awt.XFixedText
;
import
com.sun.star.awt.XListBox
;
import
com.sun.star.awt.XListBox
;
...
@@ -33,6 +34,7 @@ import com.sun.star.wizards.ui.FieldSelection;
...
@@ -33,6 +34,7 @@ import com.sun.star.wizards.ui.FieldSelection;
import
com.sun.star.wizards.ui.UIConsts
;
import
com.sun.star.wizards.ui.UIConsts
;
import
com.sun.star.wizards.ui.UnoDialog
;
import
com.sun.star.wizards.ui.UnoDialog
;
import
com.sun.star.wizards.ui.XFieldSelectionListener
;
import
com.sun.star.wizards.ui.XFieldSelectionListener
;
import
com.sun.star.wizards.ui.event.XItemListenerAdapter
;
public
class
PrimaryKeyHandler
implements
XFieldSelectionListener
public
class
PrimaryKeyHandler
implements
XFieldSelectionListener
{
{
...
@@ -79,7 +81,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
...
@@ -79,7 +81,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
40
,
sExplanations
,
Boolean
.
TRUE
,
91
,
27
,
IPRIMEKEYSTEP
,
Short
.
valueOf
(
curtabindex
++),
233
40
,
sExplanations
,
Boolean
.
TRUE
,
91
,
27
,
IPRIMEKEYSTEP
,
Short
.
valueOf
(
curtabindex
++),
233
});
});
chkcreatePrimaryKey
=
CurUnoDialog
.
insertCheckBox
(
"chkcreatePrimaryKey"
,
SPRIMEKEYMODE
,
this
,
chkcreatePrimaryKey
=
CurUnoDialog
.
insertCheckBox
(
"chkcreatePrimaryKey"
,
new
XItemListenerAdapter
()
{
@Override
public
void
itemStateChanged
(
ItemEvent
event
)
{
togglePrimeKeyFields
();
}
},
new
String
[]
new
String
[]
{
{
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STATE
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STATE
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
...
@@ -119,7 +126,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
...
@@ -119,7 +126,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
UIConsts
.
INTEGERS
[
8
],
"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL"
,
sUseSeveral
,
106
,
132
,
IPRIMEKEYSTEP
,
Short
.
valueOf
(
curtabindex
++),
200
UIConsts
.
INTEGERS
[
8
],
"HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL"
,
sUseSeveral
,
106
,
132
,
IPRIMEKEYSTEP
,
Short
.
valueOf
(
curtabindex
++),
200
});
});
chkApplyAutoValueAutomatic
=
CurUnoDialog
.
insertCheckBox
(
"chkApplyAutoValueAutomatic"
,
SPRIMEKEYMODE
,
this
,
chkApplyAutoValueAutomatic
=
CurUnoDialog
.
insertCheckBox
(
"chkApplyAutoValueAutomatic"
,
new
XItemListenerAdapter
()
{
@Override
public
void
itemStateChanged
(
ItemEvent
event
)
{
togglePrimeKeyFields
();
}
},
new
String
[]
new
String
[]
{
{
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
...
@@ -167,7 +179,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
...
@@ -167,7 +179,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
80
80
});
});
chkApplyAutoValueExisting
=
CurUnoDialog
.
insertCheckBox
(
"chkApplyAutoValueExisting"
,
SPRIMEKEYMODE
,
this
,
chkApplyAutoValueExisting
=
CurUnoDialog
.
insertCheckBox
(
"chkApplyAutoValueExisting"
,
new
XItemListenerAdapter
()
{
@Override
public
void
itemStateChanged
(
ItemEvent
event
)
{
togglePrimeKeyFields
();
}
},
new
String
[]
new
String
[]
{
{
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
...
@@ -243,7 +260,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
...
@@ -243,7 +260,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
return
false
;
return
false
;
}
}
p
ublic
void
togglePrimeKeyFields
()
p
rivate
void
togglePrimeKeyFields
()
{
{
boolean
bdoEnable
=
(
this
.
chkcreatePrimaryKey
.
getState
()
==
1
);
boolean
bdoEnable
=
(
this
.
chkcreatePrimaryKey
.
getState
()
==
1
);
Helper
.
setUnoPropertyValue
(
UnoDialog
.
getModel
(
optAddAutomatically
),
PropertyNames
.
PROPERTY_ENABLED
,
Boolean
.
valueOf
(
bdoEnable
));
Helper
.
setUnoPropertyValue
(
UnoDialog
.
getModel
(
optAddAutomatically
),
PropertyNames
.
PROPERTY_ENABLED
,
Boolean
.
valueOf
(
bdoEnable
));
...
...
wizards/com/sun/star/wizards/ui/UnoDialog2.java
Dosyayı görüntüle @
3d16e27d
...
@@ -21,6 +21,7 @@ import com.sun.star.awt.XActionListener;
...
@@ -21,6 +21,7 @@ import com.sun.star.awt.XActionListener;
import
com.sun.star.awt.XButton
;
import
com.sun.star.awt.XButton
;
import
com.sun.star.awt.XCheckBox
;
import
com.sun.star.awt.XCheckBox
;
import
com.sun.star.awt.XControl
;
import
com.sun.star.awt.XControl
;
import
com.sun.star.awt.XItemListener
;
import
com.sun.star.awt.XListBox
;
import
com.sun.star.awt.XListBox
;
import
com.sun.star.awt.XProgressBar
;
import
com.sun.star.awt.XProgressBar
;
import
com.sun.star.awt.XRadioButton
;
import
com.sun.star.awt.XRadioButton
;
...
@@ -73,23 +74,17 @@ public class UnoDialog2 extends UnoDialog
...
@@ -73,23 +74,17 @@ public class UnoDialog2 extends UnoDialog
return
xButton
;
return
xButton
;
}
}
public
XCheckBox
insertCheckBox
(
String
sName
,
String
itemChangedMethodName
,
Object
eventTarget
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
public
XCheckBox
insertCheckBox
(
String
sName
,
XItemListener
itemListener
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
{
{
XCheckBox
xCheckBox
=
(
XCheckBox
)
insertControlModel2
(
"com.sun.star.awt.UnoControlCheckBoxModel"
,
sName
,
sPropNames
,
oPropValues
,
XCheckBox
.
class
);
XCheckBox
xCheckBox
=
(
XCheckBox
)
insertControlModel2
(
"com.sun.star.awt.UnoControlCheckBoxModel"
,
sName
,
sPropNames
,
oPropValues
,
XCheckBox
.
class
);
if
(
item
ChangedMethodName
!=
null
)
if
(
item
Listener
!=
null
)
{
{
xCheckBox
.
addItemListener
(
guiEventListener
);
xCheckBox
.
addItemListener
(
itemListener
);
guiEventListener
.
add
(
sName
,
EventNames
.
ITEM_CHANGED
,
itemChangedMethodName
,
eventTarget
);
}
}
return
xCheckBox
;
return
xCheckBox
;
}
}
public
XCheckBox
insertCheckBox
(
String
sName
,
String
itemChangedMethodName
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
{
return
insertCheckBox
(
sName
,
itemChangedMethodName
,
this
,
sPropNames
,
oPropValues
);
}
public
XListBox
insertListBox
(
String
sName
,
String
actionPerformedMethodName
,
String
itemChangedMethodName
,
Object
eventTarget
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
public
XListBox
insertListBox
(
String
sName
,
String
actionPerformedMethodName
,
String
itemChangedMethodName
,
Object
eventTarget
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
{
{
XListBox
xListBox
=
(
XListBox
)
insertControlModel2
(
"com.sun.star.awt.UnoControlListBoxModel"
,
sName
,
sPropNames
,
oPropValues
,
XListBox
.
class
);
XListBox
xListBox
=
(
XListBox
)
insertControlModel2
(
"com.sun.star.awt.UnoControlListBoxModel"
,
sName
,
sPropNames
,
oPropValues
,
XListBox
.
class
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment