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
40f7f1cf
Kaydet (Commit)
40f7f1cf
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: I01143a9f3a3b563bf5da58dc4a8ed38c440a5c62
üst
7af4d5e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
21 deletions
+38
-21
FormConfiguration.java
wizards/com/sun/star/wizards/form/FormConfiguration.java
+14
-3
StyleApplier.java
wizards/com/sun/star/wizards/form/StyleApplier.java
+10
-4
PrimaryKeyHandler.java
wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
+9
-2
UnoDialog2.java
wizards/com/sun/star/wizards/ui/UnoDialog2.java
+5
-12
No files found.
wizards/com/sun/star/wizards/form/FormConfiguration.java
Dosyayı görüntüle @
40f7f1cf
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
*/
*/
package
com
.
sun
.
star
.
wizards
.
form
;
package
com
.
sun
.
star
.
wizards
.
form
;
import
com.sun.star.awt.ActionEvent
;
import
com.sun.star.awt.ItemEvent
;
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
;
...
@@ -29,6 +30,7 @@ import com.sun.star.wizards.ui.CommandFieldSelection;
...
@@ -29,6 +30,7 @@ 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.ui.event.XActionListenerAdapter
;
import
com.sun.star.wizards.ui.event.XItemListenerAdapter
;
import
com.sun.star.wizards.ui.event.XItemListenerAdapter
;
/**
/**
...
@@ -48,7 +50,6 @@ public class FormConfiguration
...
@@ -48,7 +50,6 @@ public class FormConfiguration
XListBox
lstRelations
;
XListBox
lstRelations
;
String
[]
sreferencedTables
;
String
[]
sreferencedTables
;
CommandFieldSelection
CurSubFormFieldSelection
;
CommandFieldSelection
CurSubFormFieldSelection
;
String
SONEXISTINGRELATIONSELECTION
=
"onexistingRelationSelection"
;
boolean
bsupportsRelations
;
boolean
bsupportsRelations
;
RelationController
oRelationController
=
null
;
RelationController
oRelationController
=
null
;
...
@@ -115,7 +116,17 @@ public class FormConfiguration
...
@@ -115,7 +116,17 @@ public class FormConfiguration
{
{
Boolean
.
FALSE
,
19
,
sSelectRelation
,
Boolean
.
TRUE
,
119
,
56
,
ISubFormStep
,
Short
.
valueOf
(
curtabindex
++),
80
Boolean
.
FALSE
,
19
,
sSelectRelation
,
Boolean
.
TRUE
,
119
,
56
,
ISubFormStep
,
Short
.
valueOf
(
curtabindex
++),
80
});
});
lstRelations
=
CurUnoDialog
.
insertListBox
(
"lstrelations"
,
SONEXISTINGRELATIONSELECTION
,
SONEXISTINGRELATIONSELECTION
,
this
,
lstRelations
=
CurUnoDialog
.
insertListBox
(
"lstrelations"
,
new
XActionListenerAdapter
()
{
@Override
public
void
actionPerformed
(
ActionEvent
event
)
{
onexistingRelationSelection
();
}
},
new
XItemListenerAdapter
()
{
@Override
public
void
itemStateChanged
(
ItemEvent
event
)
{
onexistingRelationSelection
();
}
},
new
String
[]
new
String
[]
{
{
PropertyNames
.
PROPERTY_ENABLED
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
PropertyNames
.
PROPERTY_ENABLED
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
...
@@ -205,7 +216,7 @@ public class FormConfiguration
...
@@ -205,7 +216,7 @@ public class FormConfiguration
return
PropertyNames
.
EMPTY_STRING
;
return
PropertyNames
.
EMPTY_STRING
;
}
}
p
ublic
void
onexistingRelationSelection
()
p
rivate
void
onexistingRelationSelection
()
{
{
String
scurreferencedTableName
=
getreferencedTableName
();
String
scurreferencedTableName
=
getreferencedTableName
();
if
(
scurreferencedTableName
.
length
()
>
0
)
if
(
scurreferencedTableName
.
length
()
>
0
)
...
...
wizards/com/sun/star/wizards/form/StyleApplier.java
Dosyayı görüntüle @
40f7f1cf
...
@@ -39,7 +39,9 @@ import com.sun.star.wizards.document.DatabaseControl;
...
@@ -39,7 +39,9 @@ import com.sun.star.wizards.document.DatabaseControl;
import
com.sun.star.wizards.document.GridControl
;
import
com.sun.star.wizards.document.GridControl
;
import
com.sun.star.wizards.document.TimeStampControl
;
import
com.sun.star.wizards.document.TimeStampControl
;
import
com.sun.star.wizards.text.TextStyleHandler
;
import
com.sun.star.wizards.text.TextStyleHandler
;
import
com.sun.star.wizards.ui.*
;
import
com.sun.star.wizards.ui.UIConsts
;
import
com.sun.star.wizards.ui.UnoDialog
;
import
com.sun.star.wizards.ui.WizardDialog
;
import
com.sun.star.wizards.ui.event.XItemListenerAdapter
;
import
com.sun.star.wizards.ui.event.XItemListenerAdapter
;
public
class
StyleApplier
public
class
StyleApplier
...
@@ -52,7 +54,6 @@ public class StyleApplier
...
@@ -52,7 +54,6 @@ public class StyleApplier
private
final
XListBox
lstStyles
;
private
final
XListBox
lstStyles
;
private
final
FormDocument
curFormDocument
;
private
final
FormDocument
curFormDocument
;
private
short
iOldLayoutPos
;
private
short
iOldLayoutPos
;
private
static
final
String
SCHANGELAYOUT
=
"changeLayout"
;
private
String
[]
StyleNames
;
private
String
[]
StyleNames
;
private
String
[]
FileNames
;
private
String
[]
FileNames
;
private
final
static
int
SOBACKGROUNDCOLOR
=
0
;
private
final
static
int
SOBACKGROUNDCOLOR
=
0
;
...
@@ -92,7 +93,12 @@ public class StyleApplier
...
@@ -92,7 +93,12 @@ public class StyleApplier
UIConsts
.
INTEGERS
[
8
],
sPageStyles
,
92
,
25
,
IStyleStep
,
Short
.
valueOf
(
curtabindex
++),
90
UIConsts
.
INTEGERS
[
8
],
sPageStyles
,
92
,
25
,
IStyleStep
,
Short
.
valueOf
(
curtabindex
++),
90
});
});
lstStyles
=
CurUnoDialog
.
insertListBox
(
"lstStyles"
,
null
,
SCHANGELAYOUT
,
this
,
lstStyles
=
CurUnoDialog
.
insertListBox
(
"lstStyles"
,
null
,
new
XItemListenerAdapter
()
{
@Override
public
void
itemStateChanged
(
ItemEvent
event
)
{
changeLayout
();
}
},
new
String
[]
new
String
[]
{
{
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
SELECTED_ITEMS
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
STRING_ITEM_LIST
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HELPURL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
SELECTED_ITEMS
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
STRING_ITEM_LIST
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
...
@@ -212,7 +218,7 @@ public class StyleApplier
...
@@ -212,7 +218,7 @@ public class StyleApplier
}
}
}
}
p
ublic
void
changeLayout
()
p
rivate
void
changeLayout
()
{
{
short
iPos
=
lstStyles
.
getSelectedItemPos
();
short
iPos
=
lstStyles
.
getSelectedItemPos
();
if
(
iPos
!=
iOldLayoutPos
)
if
(
iPos
!=
iOldLayoutPos
)
...
...
wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
Dosyayı görüntüle @
40f7f1cf
...
@@ -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.ActionEvent
;
import
com.sun.star.awt.ItemEvent
;
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
;
...
@@ -34,6 +35,7 @@ import com.sun.star.wizards.ui.FieldSelection;
...
@@ -34,6 +35,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.XActionListenerAdapter
;
import
com.sun.star.wizards.ui.event.XItemListenerAdapter
;
import
com.sun.star.wizards.ui.event.XItemListenerAdapter
;
public
class
PrimaryKeyHandler
implements
XFieldSelectionListener
public
class
PrimaryKeyHandler
implements
XFieldSelectionListener
...
@@ -165,7 +167,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
...
@@ -165,7 +167,12 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
Boolean
.
FALSE
,
UIConsts
.
INTEGERS
[
8
],
slblPrimeFieldName
,
116
,
117
,
IPRIMEKEYSTEP
,
Short
.
valueOf
(
curtabindex
++),
46
Boolean
.
FALSE
,
UIConsts
.
INTEGERS
[
8
],
slblPrimeFieldName
,
116
,
117
,
IPRIMEKEYSTEP
,
Short
.
valueOf
(
curtabindex
++),
46
});
});
lstSinglePrimeKey
=
CurUnoDialog
.
insertListBox
(
"lstSinglePrimeKey"
,
"onPrimeKeySelected"
,
null
,
this
,
lstSinglePrimeKey
=
CurUnoDialog
.
insertListBox
(
"lstSinglePrimeKey"
,
new
XActionListenerAdapter
()
{
@Override
public
void
actionPerformed
(
ActionEvent
event
)
{
onPrimeKeySelected
();
}
},
null
,
new
String
[]
new
String
[]
{
{
"Dropdown"
,
"Dropdown"
,
...
@@ -363,7 +370,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
...
@@ -363,7 +370,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener
return
bischecked
;
return
bischecked
;
}
}
p
ublic
void
onPrimeKeySelected
()
p
rivate
void
onPrimeKeySelected
()
{
{
try
try
{
{
...
...
wizards/com/sun/star/wizards/ui/UnoDialog2.java
Dosyayı görüntüle @
40f7f1cf
...
@@ -85,27 +85,20 @@ public class UnoDialog2 extends UnoDialog
...
@@ -85,27 +85,20 @@ public class UnoDialog2 extends UnoDialog
return
xCheckBox
;
return
xCheckBox
;
}
}
public
XListBox
insertListBox
(
String
sName
,
String
actionPerformedMethodName
,
String
itemChangedMethodName
,
Object
eventTarget
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
public
XListBox
insertListBox
(
String
sName
,
XActionListener
actionListener
,
XItemListener
itemListener
,
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
);
if
(
action
PerformedMethodName
!=
null
)
if
(
action
Listener
!=
null
)
{
{
xListBox
.
addActionListener
(
guiEventListener
);
xListBox
.
addActionListener
(
actionListener
);
guiEventListener
.
add
(
sName
,
EventNames
.
ACTION_PERFORMED
,
actionPerformedMethodName
,
eventTarget
);
}
}
if
(
item
ChangedMethodName
!=
null
)
if
(
item
Listener
!=
null
)
{
{
xListBox
.
addItemListener
(
guiEventListener
);
xListBox
.
addItemListener
(
itemListener
);
guiEventListener
.
add
(
sName
,
EventNames
.
ITEM_CHANGED
,
itemChangedMethodName
,
eventTarget
);
}
}
return
xListBox
;
return
xListBox
;
}
}
public
XListBox
insertListBox
(
String
sName
,
String
actionPerformed
,
String
itemChanged
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
{
return
insertListBox
(
sName
,
actionPerformed
,
itemChanged
,
this
,
sPropNames
,
oPropValues
);
}
public
XRadioButton
insertRadioButton
(
String
sName
,
XItemListener
itemListener
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
public
XRadioButton
insertRadioButton
(
String
sName
,
XItemListener
itemListener
,
String
[]
sPropNames
,
Object
[]
oPropValues
)
{
{
XRadioButton
xRadioButton
=
(
XRadioButton
)
insertControlModel2
(
"com.sun.star.awt.UnoControlRadioButtonModel"
,
sName
,
sPropNames
,
oPropValues
,
XRadioButton
.
class
);
XRadioButton
xRadioButton
=
(
XRadioButton
)
insertControlModel2
(
"com.sun.star.awt.UnoControlRadioButtonModel"
,
sName
,
sPropNames
,
oPropValues
,
XRadioButton
.
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